mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
Markdown writer: make Span with null attribute transparent.
That is, we don't use brackets or `<span>` tags to mark spans when there are no attributes; we simply output the contents.
This commit is contained in:
@@ -949,11 +949,10 @@ inlineToMarkdown opts (Span attrs ils) = do
|
||||
contents <- inlineListToMarkdown opts ils
|
||||
return $ case plain of
|
||||
True -> contents
|
||||
False | isEnabled Ext_bracketed_spans opts ->
|
||||
False | attrs == nullAttr -> contents
|
||||
| isEnabled Ext_bracketed_spans opts ->
|
||||
"[" <> contents <> "]" <>
|
||||
if attrs == nullAttr
|
||||
then "{}"
|
||||
else linkAttributes opts attrs
|
||||
linkAttributes opts attrs
|
||||
| isEnabled Ext_raw_html opts ||
|
||||
isEnabled Ext_native_spans opts ->
|
||||
tagWithAttrs "span" attrs <> contents <> text "</span>"
|
||||
|
||||
Reference in New Issue
Block a user