artempyanykh / marksman

Write Markdown with code assist and intelligence in the comfort of your favourite editor.
MIT License
1.98k stars 35 forks source link

Marksman errors on certain character sequence #334

Open dgc-proton opened 4 weeks ago

dgc-proton commented 4 weeks ago

Firstly thank you for creating and maintaining this really useful software!

Issue: A sequence of characters consisting of 3 or more 'boxes' drawn using square braces causes marksman to crash, e.g: [][][] This is poor use of markdown syntax by me; it was part of a hastily draw note inside a large markdown file. Marksman crashed whenever I opened the file until I found the culprit and put it inside a code block using ```

Limitations of testing: I have only tried this on .md files using Helix version 24.7 (079f5442) and marksman version 1.0.0-124c56+f124c5616cf38241e1a5e58808ed78e2d9a1d385 on operating system Fedora 40

Example file & error log (marksman server passed -v 4 argument for verbose logging): test.md log.txt

Expectation: It would be an improvement (in my opinion) if marksman did one or both of the following:

  1. Did not crash on this sequence of characters. This possibly relates to issue 235
  2. Gave an improved error message which indicated which line of the file it crashed on or something similar. If this is the only course of action decided on then this issue should possibly be closed as a duplicate of issue 256

Thanks

artempyanykh commented 2 weeks ago

Thanks for filing this issue @dgc-proton! The baseline expectation for the server is that it doesn't crash on any input. It's a bug if it does.

Adding this to my queue.