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
Please see facelessuser/pymdown-extensions#1312 for a full context and examples. In short: pretty-printing of HTML caused by this extension inserts extra spaces that negatively affect how the output looks in <sub/> and <sup/> cases:
Original HTML / rendering:
<p>Simple<sub>subscript</sub></p>
<p>Complex<sub>subscript with escaped spaces</sub></p>
<p>H<sub>3</sub>PO<sub>4</sub>
H<sub>2</sub>O</p>
"Beautified" HTML / rendering (notice extra spaces before subscripts and superscripts):
<p>
H
<sub>
3
</sub>
PO
<sub>
4
</sub>
H
<sub>
2
</sub>
O
</p>
Perhaps it's the prettification step that mangles the output HTML:
The prettify() method will turn a Beautiful Soup parse tree into a nicely formatted Unicode string, with a separate line for each tag and each string:
...
Since it adds whitespace (in the form of newlines), prettify()changes the meaning of an HTML document and should not be used to reformat one. The goal of prettify() is to help you visually understand the structure of the documents you work with.
Please see facelessuser/pymdown-extensions#1312 for a full context and examples. In short: pretty-printing of HTML caused by this extension inserts extra spaces that negatively affect how the output looks in
<sub/>
and<sup/>
cases:Original HTML / rendering:
"Beautified" HTML / rendering (notice extra spaces before subscripts and superscripts):
Perhaps it's the prettification step that mangles the output HTML:
The text was updated successfully, but these errors were encountered: