fix: order of content in examples
fix: preserve indentantion in code blocks
feat: convert monospace italic text to HTML-Sample style when converting to docx
"""Handles spans that apply both the `HTML_Italic` and `HTML_Monospace` classes by converting them into a single custom tag that can be handled during postprocessing."""
The text is retrieved from the provided `<pre>` tag's `<code>` child tag, which it always has. Preserves indentation by replacing any tabs with tab placeholders, which is necessary because Pandoc trims preceding whitespace.
"""
# There will only be one code tag inside the pre tag
code=pre.find("code")
code=pre.find("code",recursive=False)
ifnotcode:
return[]# Nothing to do here
# Get the direct children of the code tag. Each span contains an <a> tag and a series of spans representing a single line's worth of text.