git.iko.soy/typeable/pandoc
on master help sign in
Add literal tabs to parser.
86fc44dJesse Rosenthal
src/Text/Pandoc/Readers/Docx/Parse.hs+4−1
@@ -466,7 +466,7 @@ data Run = Run RunStyle [RunElem]
466 | Endnote String
466 | Endnote String
467 deriving Show
467 deriving Show
468
468
469−data RunElem = TextRun String | LnBrk
469+data RunElem = TextRun String | LnBrk | Tab
470 deriving Show
470 deriving Show
471
471
472data RunStyle = RunStyle { isBold :: Bool
472data RunStyle = RunStyle { isBold :: Bool
@@ -545,6 +545,9 @@ elemToRunElem ns element
545 | qName (elName element) == "br" &&
545 | qName (elName element) == "br" &&
546 qURI (elName element) == (lookup "w" ns) =
546 qURI (elName element) == (lookup "w" ns) =
547 Just $ LnBrk
547 Just $ LnBrk
548+ | qName (elName element) == "tab" &&
549+ qURI (elName element) == (lookup "w" ns) =
550+ Just $ Tab
548 | otherwise = Nothing
551 | otherwise = Nothing
549
552
550
553