diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 3 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Docx/Parse.hs | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index 490fdf878..2b92cceee 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -411,6 +411,9 @@ parPartToInlines (ExternalHyperLink target runs) = do return $ link target "" ils parPartToInlines (PlainOMath exps) = do return $ math $ writeTeX exps +parPartToInlines (SmartTag runs) = do + ils <- smushInlines <$> mapM runToInlines runs + return ils isAnchorSpan :: Inline -> Bool isAnchorSpan (Span (_, classes, kvs) _) = diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index 6cd3a49b6..0532b5497 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -218,6 +218,7 @@ data ParPart = PlainRun Run | Drawing FilePath String String B.ByteString Extent -- title, alt | Chart -- placeholder for now | PlainOMath [Exp] + | SmartTag [Run] deriving Show data Run = Run RunStyle [RunElem] @@ -709,6 +710,10 @@ elemToParPart ns element runs <- mapD (elemToRun ns) (elChildren element) return $ Deletion cId cAuthor cDate runs elemToParPart ns element + | isElem ns "w" "smartTag" element = do + runs <- mapD (elemToRun ns) (elChildren element) + return $ SmartTag runs +elemToParPart ns element | isElem ns "w" "bookmarkStart" element , Just bmId <- findAttr (elemName ns "w" "id") element , Just bmName <- findAttr (elemName ns "w" "name") element = |