diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-08-16 22:57:00 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-08-16 22:57:00 -0700 |
commit | 9d52ecdd422a6821c9f37f53e3d30d4be4e41e8f (patch) | |
tree | 93d7539fb19d4cbcbbc526fec704a5067c6c9c87 /src | |
parent | cb4ae6112e4bf9b12b3131fa96fc8d29b1e77dec (diff) | |
download | pandoc-9d52ecdd422a6821c9f37f53e3d30d4be4e41e8f.tar.gz |
HTML reader: Parse appropriately styled span as SmallCaps.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index cee7ea300..bd60a74fa 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -570,7 +570,12 @@ pSpan = try $ do guardEnabled Ext_native_spans TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="span") (const True) contents <- pInTags "span" inline - return $ B.spanWith (mkAttr attr) contents + let attr' = mkAttr attr + return $ case attr' of + ("",[],[("style",s)]) + | filter (`notElem` " \t;") s == "font-variant:small-caps" -> + B.smallcaps contents + _ -> B.spanWith (mkAttr attr) contents pRawHtmlInline :: TagParser Inlines pRawHtmlInline = do |