You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I've been working on reading figures from HTML input. The code can be found here. Details follow:
General
The HTML reader can now produce the
Figure
Block
element. This can be used further down the line in filters and writers.In order to keep the old behavior intact, I decide to implement the functionality through an extension
native_figures
. Likenative_divs
.Pandoc 2.14.0.2 behavior
Current pandoc's figure tag handling can be divided in two cases:
Only
img
andfigcaption
tags are kept in the ASTWe see that
img
andfigcaption
are preserved but theul
is absent from the internal representation. This is the case for any other tag.Only the first
img
andfigcaption
tags are kept in the ASTOf course then semantics of multiple
figcaption
tags could be considered questionable, but still:Other remarks
It's also worth mentioning that the
class
is missing from the output.My Fork
Example Run
Other remarks
In this version all
img
andfigcaption
tags are included in the AST. And the round trip conversion is very similar.<p><img .../></p>
Loses its special meaning though.Beta Was this translation helpful? Give feedback.
All reactions