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`'