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

Mardown highlighting in comments consumes closing -/ #274

Open
eric-wieser opened this issue Jun 2, 2021 · 3 comments
Open

Mardown highlighting in comments consumes closing -/ #274

eric-wieser opened this issue Jun 2, 2021 · 3 comments

Comments

@eric-wieser
Copy link
Contributor

eric-wieser commented Jun 2, 2021

These aren't highlighted correctly:

  1. /- Oh `-/` no -/
    #check 1
    The no -/ is not actually part of the comment.
  2. /- [foo]: -/
    #check 1
    The #check should not be a comment.
@gebner
Copy link
Member

gebner commented Jun 2, 2021

Yeah, I am well aware that this can happen. I've been fixing them whenever they become an issue. Unfortunately it seems to be impossible to tell vscode to stop the markdown highlighting when it sees a -/, the markdown grammar needs to cooperate here and stop itself...

In general, I didn't prioritize invalid markdown syntax, because you should usually avoid it. See also leanprover/vscode-lean4#10 (comment)

@eric-wieser
Copy link
Contributor Author

Perhaps I should have made my intention clear in opening this - I'm not after a fix, I figured it was just worth recording the bug in case someone else cares enough to fix it.

@eric-wieser
Copy link
Contributor Author

IIRC, sublime text ended up augmenting their TextMate grammar handling to make this type of "just kill the inner parser if you find a -/" action possible. Perhaps vscode will eventually go the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants