diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-11-27 14:57:48 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-11-27 14:57:48 -0800 |
commit | e9cfbd5adc7a2f19be24904b6fb4d200ddbaa9ce (patch) | |
tree | d60cb863eaedf59cb26a917e9ef1901395eba936 /src | |
parent | 970f63c18a5caf2954e02200150a4bc051a74648 (diff) | |
download | pandoc-e9cfbd5adc7a2f19be24904b6fb4d200ddbaa9ce.tar.gz |
OpenDocument writer: don't print raw TeX.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/OpenDocument.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index 4e3979c07..0e8a8bf8b 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -112,7 +112,9 @@ setInDefinitionList :: Bool -> State WriterState () setInDefinitionList b = modify $ \s -> s { stInDefinition = b } inParagraphTags :: Doc -> Doc -inParagraphTags = inTags False "text:p" [("text:style-name", "Text_20_body")] +inParagraphTags d | isEmpty d = empty +inParagraphTags d = + inTags False "text:p" [("text:style-name", "Text_20_body")] d inParagraphTagsWithStyle :: String -> Doc -> Doc inParagraphTagsWithStyle sty = inTags False "text:p" [("text:style-name", sty)] @@ -359,7 +361,7 @@ inlineToOpenDocument o ils | Code s <- ils = preformatted s | Math _ s <- ils = inlinesToOpenDocument o (readTeXMath s) | Cite _ l <- ils = inlinesToOpenDocument o l - | TeX s <- ils = preformatted s + | TeX _ <- ils = return empty | HtmlInline s <- ils = preformatted s | Link l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l | Image _ (s,_) <- ils = return $ mkImg s |