@@ -134,7 +134,9 @@ blockToDokuWiki opts (Para [Image txt (src,'f':'i':'g':':':tit)]) = do
134 let opt = if null txt
134 let opt = if null txt
136 else "|" ++ if null tit then capt else tit ++ capt
136 else "|" ++ if null tit then capt else tit ++ capt
137+ -- Relative links fail isURI and receive a colon
138+ prefix = if isURI src then "" else ":"
137− return $ "{{:" ++ src ++ opt ++ "}}\n"
139+ return $ "{{" ++ prefix ++ src ++ opt ++ "}}\n"
139blockToDokuWiki opts (Para inlines) = do
141blockToDokuWiki opts (Para inlines) = do
140 indent <- stIndent <$> ask
142 indent <- stIndent <$> ask
@@ -478,7 +480,9 @@ inlineToDokuWiki opts (Image alt (source, tit)) = do
478 ("", []) -> ""
480 ("", []) -> ""
479 ("", _ ) -> "|" ++ alt'
481 ("", _ ) -> "|" ++ alt'
480 (_ , _ ) -> "|" ++ tit
482 (_ , _ ) -> "|" ++ tit
483+ -- Relative links fail isURI and receive a colon
484+ prefix = if isURI source then "" else ":"
481− return $ "{{:" ++ source ++ txt ++ "}}"
485+ return $ "{{" ++ prefix ++ source ++ txt ++ "}}"
483inlineToDokuWiki opts (Note contents) = do
487inlineToDokuWiki opts (Note contents) = do
484 contents' <- blockListToDokuWiki opts contents
488 contents' <- blockListToDokuWiki opts contents