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

Spelling is stopped at three ~ #381

Open
Hamzelot opened this issue Dec 12, 2021 · 1 comment
Open

Spelling is stopped at three ~ #381

Hamzelot opened this issue Dec 12, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Hamzelot
Copy link

Describe the bug
Hello,

I am currently working with Showoff https://puppetlabs.github.io/showoff/ where there are commands for sectioning

~~~SECTION:handouts~~~
~~~ENDSECTION~~~

etc.

https://puppetlabs.github.io/showoff/documentation/AUTHORING_rdoc.html

Once these sections are defined, the rest of the text is no longer checked for spelling errors.

It seems that as soon as three consecutive ~ are made, the checking stops.

To Reproduce
Steps to reproduce the behavior:

  1. open a new .md file
  2. write three consecutive ~ in the first line
  3. write one spelling error in the second line

Expected behavior
Spelling should not be interrupted.

Screenshots
Not Working:
notworking
Working:
Working
Not Working:
notworking_2
Working:
Working_2

Environment & Configuration (please complete the following information):

  • OS + Version: Debian GNU/Linux 11 (bullseye) 5.10.0-9-amd64
  • VS Code Version: 1.63.0
  • LanguageTool Linter Version: 0.19.0
  • Service Configuration: external
@Hamzelot Hamzelot added the bug Something isn't working label Dec 12, 2021
@davidlday
Copy link
Owner

The problem appears to be that the underlying parser I use (remarkjs.org via my other package annotatedtext-remark) adheres to the CommonMark spec, and the way Showoff uses tildes (~) breaks the spec, or at least the parser. The parser I'm using sees three tildas (~~~) as the beginning of a code fence (https://spec.commonmark.org/0.30/#code-fence). This linter ignores everything in a code fence because it's probably code. In this case, the parser never sees a closing to the code fence because it expects three tildas (~~~) on a line by themselves, so anything after the perceived start of a code fence is ignored.

You can test this by adding three tildas (~~~) on their own line at line 18 in your first screenshot.

I can see the problem, but I don't see any immediate fix because it stems from the parser. Will need time to think this through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants