-
Notifications
You must be signed in to change notification settings - Fork 35
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 reading logseq-specific markdown files #156
Comments
Thanks for reporting this @mrene! Could you tell me what is the output of The stack trace points to an error in header parsing, but I'm not sure what in the contents of the file might cause this. |
Thanks for looking at this so quickly! I'm using neovim on NIxOS, I tried the latest commit on the main branch (ecef5e8) and it would crash as well. Here's the file that reproduces the crash, maybe it's sensitive to some non-visible whitespace content. Starting marksman in an empty dir with only that file (and .git so it finds a root) crashes reliably |
@mrene thank you! I could reproduce the issue. |
The issue is in one of Marksman's dependencies. I submitted a fix, let's see if/when it gets merged. @mrene as a workaround just add a newline after the last dash
is treated as a 2nd level heading with the text If these logseq properties are always at the top of the file, they could be treated similarly to a YAML front-matter, but I'd need someone who uses logseq to confirm 😉 |
Thanks for the fix! These properties can be in any block (denoted by |
I see! @mrene could you provide a more complete example of a logseq markdown document with a couple of these blocks? I think adding an option to disable setext-headings would be an easy way to avoid problems with logseq markdown, but I'd need to see a more complete example first. |
@mrene thank you! So, these properties are really just lines of the form
If so, I think we should be good. |
Oh no the two single dash lines just happen by accident when you hit enter in an empty page (they all start with a single one), props are just key:: value |
Cool! Than we're good here. |
The following exception occurs when trying to parse logseq markdown files that have additional properties.
In logseq, blocks (bullet points) and markdown files can have properties, which are structured as
identifier:: contents
. It will save the last filter settings and block states (collapsed, expanded) into these properties.In this case, a file named
inbox.md
was causing the crash and contained the following:Note that it crashes even if the file isn't the file being browsed as it's trying to index the full directory.
The text was updated successfully, but these errors were encountered: