X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Rakka.git;a=blobdiff_plain;f=Rakka%2FWiki%2FFormatter.hs;h=969c228a756ad93d269ff8d69d219466ece5bd99;hp=983673bf9614867a619f211e136a7b5980ce6d54;hb=656fdb2772ab4de5cd083cbe9e7c1610cccef73b;hpb=ee28059eadd401e5f9256df590bbb7491f952685 diff --git a/Rakka/Wiki/Formatter.hs b/Rakka/Wiki/Formatter.hs index 983673b..969c228 100644 --- a/Rakka/Wiki/Formatter.hs +++ b/Rakka/Wiki/Formatter.hs @@ -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" - }