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
<code>, <kbd>, and <samp> elements are all converted to Markdown code spans with single backticks.
However, underscores in <kbd> and <samp> are incorrectly escaped (they become literal backslashes in the Markdown code span), whereas underscores in <code> are correctly not escaped:
from markdownify import markdownify as md
md('<code>A_B_C</code>') # > '`A_B_C`'
md('<kbd>A_B_C</kbd>') # > '`A\\_B\\_C`'
md('<samp>A_B_C</samp>') # > '`A\\_B\\_C`'
The text was updated successfully, but these errors were encountered:
chrispy-snps
changed the title
underscores in <kbd> are incorrectly escaped, whereas underscores in <code> are correctly not escaped
underscores in <kbd> are incorrectly escaped, whereas underscores in <code> and <samp> are correctly not escaped
Jan 13, 2024
chrispy-snps
changed the title
underscores in <kbd> are incorrectly escaped, whereas underscores in <code> and <samp> are correctly not escaped
underscores in <kbd> and <samp> are incorrectly escaped, whereas underscores in <code> are correctly not escaped
Jan 15, 2024
<code>
,<kbd>
, and<samp>
elements are all converted to Markdown code spans with single backticks.However, underscores in
<kbd>
and<samp>
are incorrectly escaped (they become literal backslashes in the Markdown code span), whereas underscores in<code>
are correctly not escaped:The text was updated successfully, but these errors were encountered: