Skip to content

Commit

Permalink
HTML reader: parse <small> as a Span with class "small".
Browse files Browse the repository at this point in the history
Closes #5080.
  • Loading branch information
jgm committed Nov 16, 2018
1 parent e61d1d0 commit e61f632
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Text/Pandoc/Readers/HTML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ inline = choice
, pStrong
, pSuperscript
, pSubscript
, pSmall
, pStrikeout
, pUnderline
, pLineBreak
Expand Down Expand Up @@ -718,6 +719,9 @@ pSuperscript = pInlinesInTags "sup" B.superscript
pSubscript :: PandocMonad m => TagParser m Inlines
pSubscript = pInlinesInTags "sub" B.subscript

pSmall :: PandocMonad m => TagParser m Inlines
pSmall = pInlinesInTags "small" (B.spanWith ("",["small"],[]))

pStrikeout :: PandocMonad m => TagParser m Inlines
pStrikeout =
pInlinesInTags "s" B.strikeout <|>
Expand Down
7 changes: 7 additions & 0 deletions test/command/5080.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ pandoc -t asciidoc
^D
[.small .red]#foo _bar_#
```

```
pandoc -f html -t asciidoc
<small>SMALL</small>
^D
[.small]#SMALL#
```

0 comments on commit e61f632

Please sign in to comment.