]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Image.hs
Exodus to GHC 6.8.1
[Rakka.git] / Rakka / Wiki / Interpreter / Image.hs
index 97ffc8e1fafebc738a0818af3820548f417ac882..9b6ff747f63b1f4d0d8886a3a5d3f9abc6b7455f 100644 (file)
@@ -26,13 +26,13 @@ imageInterp
     = InlineCommandInterpreter {
         iciName      = "img"
       , iciInterpret
-          = \ ctx (InlineCommand _ attrs inside) ->
+          = \ ctx (InlineCommand _ attrs _) ->
             do BaseURI baseURI <- getSysConf (ctxSysConf ctx)
 
-               let pageName    = case lookup "src" attrs of
+               let name        = case lookup "src" attrs of
                                    Just x  -> x
                                    Nothing -> error "\"src\" attribute is missing"
-                   hrefAttr    = ("href", uriToString id (mkPageURI baseURI pageName) "")
+                   hrefAttr    = ("href", uriToString id (mkPageURI baseURI name) "")
                    alt         = lookup "alt" attrs
                    classAttr   = case lookup "float" attrs of
                                    Nothing      -> ("class", "inlineImage")
@@ -41,7 +41,7 @@ imageInterp
                                    Just others  -> error ("unknown \"float\" attribute: " ++ others)
                    anchorAttrs = [hrefAttr, classAttr]
 
-               return (Anchor anchorAttrs [Image (Right pageName) alt])
+               return (Anchor anchorAttrs [Image (Right name) alt])
       }
 
 
@@ -63,10 +63,10 @@ imgFrameInterp
           = \ ctx (BlockCommand _ attrs inside) ->
             do BaseURI baseURI <- getSysConf (ctxSysConf ctx)
 
-               let pageName    = case lookup "src" attrs of
+               let name        = case lookup "src" attrs of
                                    Just x  -> x
                                    Nothing -> error "\"src\" attribute is missing"
-                   hrefAttr    = ("href", uriToString id (mkPageURI baseURI pageName) "")
+                   hrefAttr    = ("href", uriToString id (mkPageURI baseURI name) "")
                    classAttr   = case lookup "float" attrs of
                                    Nothing      -> ("class", "imageFrame")
                                    Just "left"  -> ("class", "imageFrame leftFloat")
@@ -76,7 +76,7 @@ imgFrameInterp
                return (Div [classAttr]
                        [ Block (Div [("class", "imageData")]
                                         [ Inline (Anchor [hrefAttr]
-                                                  [ Image (Right pageName) Nothing ]) ])
+                                                  [ Image (Right name) Nothing ]) ])
                        , Block (Div [("class", "imageCaption")]
                                         [ Block x | x <- inside ])
                        ]