Skip to content

Commit

Permalink
Handle <abbr> as a span-like inline
Browse files Browse the repository at this point in the history
Closes #5793
  • Loading branch information
silby authored and jgm committed Jan 29, 2025
1 parent f17de99 commit d680ce0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Shared.hs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ addMetaField key val (Meta meta) =
-- | Set of HTML elements that are represented as Span with a class equal as
-- the element tag itself.
htmlSpanLikeElements :: Set.Set T.Text
htmlSpanLikeElements = Set.fromList ["kbd", "mark", "dfn"]
htmlSpanLikeElements = Set.fromList ["kbd", "mark", "dfn", "abbr"]

-- | Reformat 'Inlines' as code, putting the stringlike parts in 'Code'
-- elements while bringing other inline formatting outside.
Expand Down
13 changes: 13 additions & 0 deletions test/command/5793.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```
% pandoc -f html -t djot
You can use <abbr title="Cascading Style Sheets">CSS</abbr>
^D
You can use [CSS]{.abbr title="Cascading Style Sheets"}
```

```
% pandoc -f djot -t html
You can use [CSS]{.abbr title="Cascading Style Sheets"}
^D
<p>You can use <abbr title="Cascading Style Sheets">CSS</abbr></p>
```

0 comments on commit d680ce0

Please sign in to comment.