Replies: 2 comments 5 replies
-
Would consider it. I'm not quite sure what the purpose of that check was. |
Beta Was this translation helpful? Give feedback.
-
OK, I merged the PR, but still thinking about this issue. Currently we handle the cases of a div with empty attr and a span with empty attr differently. A div with empty attr (after the PR) turns into
While a span with empty attr turns into just its contents. It seems odd to use different approaches in these two cases. Since the motivation for removing the empty attr check was to avoid raw HTML, what if we just do what we did with spans, and print the contents of the div without any marker? The alternative would be to use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was slightly surprised by the fact that the Markdown writer can emit
<div>
when-t markdown+fenced_divs
, due to a check for empty attributes in addition to the check forExt_fenced_divs
.Would you consider accepting a PR from us that adds an additional Markdown writer extension
Ext_force_fenced_divs
, which would bypass that check? It would be useful for us over at the Quarto project to be able to specify a set of extensions that guarantees that no "naked" html elements are emitted by Pandoc's Markdown writer. I can come up with a workaround involving the injection of a UUID-named class and removal, but it would be a lot cleaner to just add+force_fenced_divs
to our Markdown Writer calls.Beta Was this translation helpful? Give feedback.
All reactions