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

Not catching misspellings in some Markdown areas #105

Closed
cretz opened this issue Dec 27, 2017 · 5 comments
Closed

Not catching misspellings in some Markdown areas #105

cretz opened this issue Dec 27, 2017 · 5 comments
Labels

Comments

@cretz
Copy link

cretz commented Dec 27, 2017

Some nested bullets don't get checked, e.g.

image

Notice how the third and fourth there aren't checked. There are probably other places in the markdown file that don't get checked either.

@bartosz-antosik
Copy link
Owner

bartosz-antosik commented Dec 27, 2017

Hi! No, it probably does not affect other places. It was caused consciously by #100 and I have no idea at the moment how to reasonably judge whether something that is indented by 4 spaces is code block or bullet. Now I even have doubts whether indent of four spaces really does introduce code block...

@cretz
Copy link
Author

cretz commented Dec 27, 2017

Four space indent does introduce a code block (commonmark should provide some spec details here). Based on some tests you may not be able to get by with stateless, logic-less regex alone to determine what is and isn't a codeblock (you might have to count what level you are at, at which point if you really want to do it right, you grab an actual markdown parser or you leverage vscode's built in one somehow to access the AST).

@bartosz-antosik
Copy link
Owner

Thanks for the input. I will have to deliberate on this a while.

@bartosz-antosik
Copy link
Owner

I see that this causes problems even to VSCode parser (syntax highlight vs. preview):

image

bartosz-antosik pushed a commit that referenced this issue Dec 28, 2017
@bartosz-antosik
Copy link
Owner

In version 2.1.0 the regular expression is refined to resolve the case reported. It does not resolve the problem generally and there may be some cases (e.g. far level bullet - code - bullet paragraph continuation) which will generate a false positive but it should help. I will close the thread but l leave a note in my TODO file to maybe investigate it deeper. Would love someone to help refine the internal parser because as far as I can tell there is no way to use VSCodes internal parser!

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

No branches or pull requests

2 participants