Fix bug with mistakenly trying to html parse images :)
This commit is contained in:
parent
242030049c
commit
32b57bd849
|
@ -248,8 +248,13 @@ class Node:
|
|||
subnodes = []
|
||||
if other.wikilink in [n.wikilink for n in self.push_nodes()]:
|
||||
for subnode in self.subnodes:
|
||||
# I tried parsing the marko tree but honestly this seemed easier/simpler.
|
||||
html = render.markdown(subnode.content)
|
||||
if subnode.mediatype != 'text/plain':
|
||||
continue
|
||||
try:
|
||||
# I tried parsing the marko tree but honestly this seemed easier/simpler.
|
||||
html = render.markdown(subnode.content)
|
||||
except AssertionError:
|
||||
breakpoint()
|
||||
try:
|
||||
tree = lxml.html.fromstring(html)
|
||||
except lxml.etree.ParserError:
|
||||
|
|
Loading…
Reference in New Issue