]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Formatter.hs
The big change
[Rakka.git] / Rakka / Wiki / Formatter.hs
index 983673bf9614867a619f211e136a7b5980ce6d54..969c228a756ad93d269ff8d69d219466ece5bd99 100644 (file)
@@ -5,7 +5,6 @@ module Rakka.Wiki.Formatter
 
 import           Control.Arrow
 import           Control.Arrow.ArrowList
-import           Control.Arrow.ArrowTree
 import           Data.Char
 import           Data.List
 import           Data.Maybe
@@ -21,7 +20,7 @@ formatWikiBlocks
     = proc (baseURI, blocks)
     -> do block   <- arrL id     -< blocks
           tree    <- formatBlock -< (baseURI, block)
-          attachXHtmlNs -< tree
+          returnA -< tree
 
 
 formatElement :: (ArrowXml a, ArrowChoice a) => a (URI, Element) XmlTree
@@ -241,8 +240,8 @@ formatPageLink
 
 
 formatImage :: (ArrowXml a) => a (URI, InlineElement) XmlTree
-formatImage = proc (baseURI, Image name alt)
-            -> let uri  = mkObjectURI baseURI name
+formatImage = proc (baseURI, Image src alt)
+            -> let uri  = mkObjectURI baseURI src
                    href = uriToString id uri ""
                in
                  ( eelem "img"
@@ -267,13 +266,3 @@ mkAnchor :: (ArrowXml a) => a (String, String) XmlTree
 mkAnchor = eelem "a"
            += attr "href" (arr fst >>> mkText)
            += (arr snd >>> mkText)
-
-
-attachXHtmlNs :: ArrowXml a => a XmlTree XmlTree
-attachXHtmlNs = processBottomUp (changeQName attach')
-    where
-      attach' :: QName -> QName
-      attach' qn = qn {
-                     namePrefix   = "xhtml"
-                   , namespaceUri = "http://www.w3.org/1999/xhtml"
-                   }