packages feed

bamboo-plugin-highlight 2009.6.9 → 2009.7.5

raw patch · 4 files changed

+21/−29 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

bamboo-plugin-highlight.cabal view
@@ -1,10 +1,10 @@ Name:                 bamboo-plugin-highlight-Version:              2009.6.9+Version:              2009.7.5 Build-type:           Simple-Synopsis:             bamboo-plugin-highlight+Synopsis:             A highlight middleware Description:         -    A standard hack middleware that highlights source code automaticaly+    It uses highlighting-kate to highlight any code inside pre / code with a class attribute hinting the language. It's a proper middleware that works on any html document.  License:              GPL License-file:         LICENSE
changelog.md view
@@ -1,3 +1,10 @@+2009.7.5+--------++### Fix++check .class in pre tag+ 2009.6.9 --------- 
readme.md view
@@ -1,3 +1,10 @@+what+----++    <pre class="haskell"><code>print "hello"</code></pre>++will highlight code as haskell source, for that the value of class attribute of pre element is haskell.+ use --- @@ -48,18 +55,14 @@     module Main where      import Hack.Contrib.Middleware.Debug-    -- import Hack.Contrib.Request (inputs)-    -- import Hack.Contrib.Middleware.Inspect-    -- import Hack.Contrib.Middleware.SimpleAccessLogger     import Bamboo     import Bamboo.Theme.Blueprint+    import Bamboo.Plugin.Highlight     import Hack     import Hack.Contrib.Middleware.BounceFavicon     import Hack.Contrib.Middleware.ContentLength     import Hack.Contrib.Middleware.ContentType     import Hack.Contrib.Middleware.ETag-    import Hack.Contrib.Middleware.Lambda-    import Hack.Contrib.Middleware.Lucky     import Hack.Contrib.Middleware.ShowExceptions     import Hack.Contrib.Middleware.ShowStatus     import Hack.Contrib.Middleware.Static@@ -67,9 +70,7 @@     import Hack.Contrib.Middleware.URLMap     import Hack.Handler.Happstack     import qualified Hack.Contrib.Middleware.Head as H-    import Bamboo.Plugin.Highlight-    import Control.Arrow ((<<<))-+         import MPSUTF8     import Prelude hiding ((.), (>)) @@ -84,13 +85,6 @@       -- filter       ,  bounce_favicon -      -- setup-      --,  parse_multipart--      -- debug-      -- ,  inspect-      -- ,  debug (\e r -> e.print)-       -- completeness       ,  content_length       ,  content_type default_content_type@@ -103,27 +97,17 @@       -- optimization       ,  H.head -      -- log-      --,  simple_access_logger Nothing--      -- for fun-      ,  lucky-      ,  lambda-       , url_map [("", bamboo)]       ]       where         bamboo = use -          [bamboo_serve, no_rss <<< bamboo_with_theme blueprint] dummy_app-        -- show_env     = debug (\e r -> e.print)+          [bamboo_serve, no_rss, bamboo_with_theme blueprint] dummy_app         bamboo_serve = static (Just "db/public")              ["/theme", "/images", "/plugin", "/favicon.ico", "/media"]         no_rss app = \env -> do           if env.path_info.ends_with "rss.xml"              then app env             else highlight app env--    -- test_app = \env -> return $ def .set_body (env.inputs.show)      app :: Application     app = use stack dummy_app
src/Bamboo/Plugin/Highlight.hs view
@@ -52,6 +52,7 @@         is_code_block =              isElem           > hasName "pre"+          > hasAttr "class"           > getChildren           > isElem           > hasName "code"