Fully render inner html of an `etree` element as a string.
(el: etree.Element, md: Markdown)
| 136 | |
| 137 | |
| 138 | def render_inner_html(el: etree.Element, md: Markdown) -> str: |
| 139 | """ Fully render inner html of an `etree` element as a string. """ |
| 140 | # The `UnescapeTreeprocessor` runs after `toc` extension so run here. |
| 141 | text = unescape(md.serializer(el)) |
| 142 | |
| 143 | # strip parent tag |
| 144 | start = text.index('>') + 1 |
| 145 | end = text.rindex('<') |
| 146 | text = text[start:end].strip() |
| 147 | |
| 148 | return run_postprocessors(text, md) |
| 149 | |
| 150 | |
| 151 | def remove_fnrefs(root: etree.Element) -> etree.Element: |
no test coverage detected
searching dependent graphs…