8000 A link referencing another document makes the preview crash · Issue #35 · ondratu/formiko · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
A link referencing another document makes the preview crash #35
Open
@mbideau

Description

@mbideau

Try this mardown content example :

# test file
A link referencing another document in the same folder is crashing, example :
[crashing link](otherdoc.md)

That produce the following error in the preview pane :

Exception Error!

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/formiko/renderer.py", line 267, in render_output
    html = publish_string(**kwargs).decode('utf-8')
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 407, in publish_string
    output, pub =
5AFC
 publish_programmatically(
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 665, in publish_programmatically
    output = pub.publish(enable_exit_status=enable_exit_status)
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 220, in publish
    output = self.writer.write(self.document, self.destination)
  File "/usr/lib/python3/dist-packages/docutils/writers/__init__.py", line 78, in write
    self.translate()
  File "/usr/lib/python3/dist-packages/docutils/writers/_html_base.py", line 78, in translate
    self.document.walkabout(visitor)
  File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 206, in walkabout
    visitor.dispatch_visit(self)
  File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 1995, in dispatch_visit
    return method(node)
  File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 2018, in unknown_visit
    raise NotImplementedError(
NotImplementedError:  visiting unknown node type: pending_xref

If I preprend the link href with an "http://" or a "#" the exception disappear.

I think this is very problematic to not be able to use reference to other document in the same folder/tree.

PS: thank you very much for this software that is working really fine for me except for this bug 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0