git.iko.soy/typeable/pandoc
on master help sign in
HTML reader: parse `<small>` as a Span with class "small".

Closes #5080.

commite61f63253130480c43d8bb4f4531e83d0384daf5 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 15 Nov 2018, 22:36 (8 years ago) parente61d1d0
2 files changed+11
src/Text/Pandoc/Readers/HTML.hs+4 test/command/5080.md+7
src/Text/Pandoc/Readers/HTML.hs+4
@@ -655,6 +655,7 @@ inline = choice
655655 , pStrong
656656 , pSuperscript
657657 , pSubscript
658+ , pSmall
658659 , pStrikeout
659660 , pUnderline
660661 , pLineBreak
@@ -718,6 +719,9 @@ pSuperscript = pInlinesInTags "sup" B.superscript
718719pSubscript :: PandocMonad m => TagParser m Inlines
719720pSubscript = pInlinesInTags "sub" B.subscript
720721
722+pSmall :: PandocMonad m => TagParser m Inlines
723+pSmall = pInlinesInTags "small" (B.spanWith ("",["small"],[]))
724+
721725pStrikeout :: PandocMonad m => TagParser m Inlines
722726pStrikeout =
723727 pInlinesInTags "s" B.strikeout <|>
test/command/5080.md+7
@@ -4,3 +4,10 @@ pandoc -t asciidoc
44^D
55[.small .red]#foo _bar_#
66```
7+
8+```
9+pandoc -f html -t asciidoc
10+<small>SMALL</small>
11+^D
12+[.small]#SMALL#
13+```