HTML reader: parse <small> as a Span with class "small".

Closes #5080.
This commit is contained in:
John MacFarlane 2018-11-15 22:36:01 -08:00
parent e61d1d0da9
commit e61f632531
2 changed files with 11 additions and 0 deletions

View file

@ -655,6 +655,7 @@ inline = choice
, pStrong , pStrong
, pSuperscript , pSuperscript
, pSubscript , pSubscript
, pSmall
, pStrikeout , pStrikeout
, pUnderline , pUnderline
, pLineBreak , pLineBreak
@ -718,6 +719,9 @@ pSuperscript = pInlinesInTags "sup" B.superscript
pSubscript :: PandocMonad m => TagParser m Inlines pSubscript :: PandocMonad m => TagParser m Inlines
pSubscript = pInlinesInTags "sub" B.subscript pSubscript = pInlinesInTags "sub" B.subscript
pSmall :: PandocMonad m => TagParser m Inlines
pSmall = pInlinesInTags "small" (B.spanWith ("",["small"],[]))
pStrikeout :: PandocMonad m => TagParser m Inlines pStrikeout :: PandocMonad m => TagParser m Inlines
pStrikeout = pStrikeout =
pInlinesInTags "s" B.strikeout <|> pInlinesInTags "s" B.strikeout <|>

View file

@ -4,3 +4,10 @@ pandoc -t asciidoc
^D ^D
[.small .red]#foo _bar_# [.small .red]#foo _bar_#
``` ```
```
pandoc -f html -t asciidoc
<small>SMALL</small>
^D
[.small]#SMALL#
```