Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when wikilink in heading #88

Closed
GuutBoy opened this issue Nov 13, 2023 · 6 comments
Closed

Crash when wikilink in heading #88

GuutBoy opened this issue Nov 13, 2023 · 6 comments
Labels
bug Something isn't working Textual Issue Issues that are really down to how Textual works

Comments

@GuutBoy
Copy link

GuutBoy commented Nov 13, 2023

Frogmouth is great, but I noticed it crashes on markdown files if there is a wiki style link in a heading where the path starts with a /.

Example:

# Heading 1

## Heading 2 [[/test.md]]

results in error:

MarkupError: closing tag '[/test.md]' at position 21 doesn't match any open tag

This is in frogmouth 0.9.1 (Textual v0.41.0)

@GuutBoy GuutBoy changed the title Crash in wikilink in headline Crash when wikilink in headline Nov 13, 2023
@GuutBoy GuutBoy changed the title Crash when wikilink in headline Crash when wikilink in heading Nov 13, 2023
@davep
Copy link
Contributor

davep commented Nov 13, 2023

I would imagine there's a couple of things going on here, the main one being that frogmouth doesn't currently support any sort of wiki-style extension to Markdown files (see #21). On top of that the error itself would suggest that such a link is being seen as Rich markup (which might in turn suggest that something would need to be done in the Textual Markdown widget).

@GuutBoy
Copy link
Author

GuutBoy commented Nov 13, 2023

Understandable that not all markdown extensions can be fully supported.

I wonder though if there is some way to at least make the program fail a little more gracefully so it just doesn't crash entirely.

@davep
Copy link
Contributor

davep commented Nov 15, 2023

I wonder though if there is some way to at least make the program fail a little more gracefully so it just doesn't crash entirely.

Oh, for sure, hence:

On top of that the error itself would suggest that such a link is being seen as Rich markup (which might in turn suggest that something would need to be done in the Textual Markdown widget).

That is, I suspect this might actually be something to first check in Textual's widget.

@GuutBoy
Copy link
Author

GuutBoy commented Nov 16, 2023

You are right. It seems to be a bug in Textuals Markdown Widget. I reported the bug on their issue tracker.
Textualize/textual#3689

@davep
Copy link
Contributor

davep commented Nov 16, 2023

Awesome; thanks for raising that. I'll keep this open too for the duration.

@davep davep added Textual Issue Issues that are really down to how Textual works bug Something isn't working labels Nov 16, 2023
@davep
Copy link
Contributor

davep commented Mar 26, 2024

Fixed via Textualize/textual#3689

@davep davep closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Textual Issue Issues that are really down to how Textual works
Projects
None yet
Development

No branches or pull requests

2 participants