Track simplified code block structure.

This commit is contained in:
Sergio Martínez Portela 2022-05-07 23:33:04 +02:00
parent 81e6935157
commit 51245491e1

View File

@ -154,15 +154,7 @@ def render_list_item(element, acc):
def render_code_block(element, acc):
acc.append('<pre><code>')
for line in element.lines:
if isinstance(line, org_rw.org_rw.Text):
for tok in line.contents:
if not isinstance(tok, org_rw.org_rw.MarkerToken):
acc.append(tok)
elif isinstance(line, dom.CodeBlock):
print(line.lines)
else:
print(type(line))
acc.append(element.lines)
acc.append('</code></pre>')