diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 15:14:35 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 15:14:35 -0700 |
commit | f6b81b29050ae2ccaea3bdb8c6856c62a00e6a42 (patch) | |
tree | db1bc342bc05f23ac05af0e495e45492d874e647 /src/Text/Pandoc | |
parent | a7daf29eafbfc5cee6f398369ef645d1e1ebd24c (diff) | |
download | pandoc-f6b81b29050ae2ccaea3bdb8c6856c62a00e6a42.tar.gz |
Markdown writer: use Span instead of (hackish) SmallCaps in plainify.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 3beba3bdd..0acfe870d 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -84,18 +84,19 @@ writePlain opts document = plainify :: Pandoc -> Pandoc plainify = walk go where go :: Inline -> Inline - go (Emph xs) = SmallCaps xs - go (Strong xs) = SmallCaps xs - go (Strikeout xs) = SmallCaps xs - go (Superscript xs) = SmallCaps xs - go (Subscript xs) = SmallCaps xs - go (SmallCaps xs) = SmallCaps xs + go (Emph xs) = Span ("",[],[]) xs + go (Strong xs) = Span ("",[],[]) xs + go (Strikeout xs) = Span ("",[],[]) xs + go (Superscript xs) = Span ("",[],[]) xs + go (Subscript xs) = Span ("",[],[]) xs + go (SmallCaps xs) = Span ("",[],[]) xs + go (Span _ xs) = Span ("",[],[]) xs go (Code _ s) = Str s go (Math _ s) = Str s go (RawInline _ _) = Str "" - go (Link xs _) = SmallCaps xs - go (Image xs _) = SmallCaps $ [Str "["] ++ xs ++ [Str "]"] - go (Cite _ cits) = SmallCaps cits + go (Link xs _) = Span ("",[],[]) xs + go (Image xs _) = Span ("",[],[]) $ [Str "["] ++ xs ++ [Str "]"] + go (Cite _ cits) = Span ("",[],[]) cits go x = x pandocTitleBlock :: Doc -> [Doc] -> Doc -> Doc |