ZimWiki writer: removed commented out code that confused Haddock.
See https://travis-ci.org/jgm/pandoc/jobs/141542247
This commit is contained in:
parent
7fdcd9a6e2
commit
b3382cf377
1 changed files with 8 additions and 8 deletions
|
@ -114,7 +114,7 @@ blockToZimWiki opts (Para inlines) = do
|
||||||
blockToZimWiki opts (RawBlock f str)
|
blockToZimWiki opts (RawBlock f str)
|
||||||
| f == Format "zimwiki" = return str
|
| f == Format "zimwiki" = return str
|
||||||
| f == Format "html" = do cont <- indentFromHTML opts str; return cont
|
| f == Format "html" = do cont <- indentFromHTML opts str; return cont
|
||||||
| otherwise = return "" -- $ "** unknown raw block "++ show f ++ "=" ++ str ++ " **"
|
| otherwise = return ""
|
||||||
|
|
||||||
blockToZimWiki _ HorizontalRule = return "\n----\n"
|
blockToZimWiki _ HorizontalRule = return "\n----\n"
|
||||||
|
|
||||||
|
@ -204,17 +204,17 @@ indentFromHTML _ str = do
|
||||||
let val = drop 10 $ reverse $ drop 1 $ reverse str
|
let val = drop 10 $ reverse $ drop 1 $ reverse str
|
||||||
--let val = take ((length valls) - 2) valls
|
--let val = take ((length valls) - 2) valls
|
||||||
modify $ \s -> s { stItemNum = read val }
|
modify $ \s -> s { stItemNum = read val }
|
||||||
return "" -- $ indent ++ val ++ "." -- zim does its own numbering
|
return ""
|
||||||
else if isInfixOf "<ol>" str then do
|
else if isInfixOf "<ol>" str then do
|
||||||
let olcount=countSubStrs "<ol>" str
|
let olcount=countSubStrs "<ol>" str
|
||||||
modify $ \s -> s { stIndent = stIndent s ++ replicate olcount '\t', stItemNum = 1 }
|
modify $ \s -> s { stIndent = stIndent s ++ replicate olcount '\t', stItemNum = 1 }
|
||||||
return "" -- $ "OL-ON[" ++ newfix ++"]"
|
return ""
|
||||||
else if isInfixOf "</ol>" str then do
|
else if isInfixOf "</ol>" str then do
|
||||||
let olcount=countSubStrs "/<ol>" str
|
let olcount=countSubStrs "/<ol>" str
|
||||||
modify $ \s -> s{ stIndent = drop olcount (stIndent s) }
|
modify $ \s -> s{ stIndent = drop olcount (stIndent s) }
|
||||||
return "" -- $ "OL-OFF[" ++ newfix ++"]"
|
return ""
|
||||||
else
|
else
|
||||||
return $ "" -- ** unknown inner HTML "++ str ++"**"
|
return ""
|
||||||
|
|
||||||
countSubStrs :: String -> String -> Int
|
countSubStrs :: String -> String -> Int
|
||||||
countSubStrs sub str = length $ breakOnAll (pack sub) (pack str)
|
countSubStrs sub str = length $ breakOnAll (pack sub) (pack str)
|
||||||
|
|
Loading…
Add table
Reference in a new issue