valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
786 stars 26 forks source link

Punctuation in German Markdown headings #419

Closed TimTechDev closed 2 years ago

TimTechDev commented 2 years ago

Note: Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Is your feature request related to a problem? Please describe.
The rule PUNCTUATION_PARAGRAPH_END is active on Markdown headings, when in de-DE. This causes trouble because, in general, headlines used in long form documents are written without final punctuation. Also, this rule conflicts in this case with markdownlint rule MD026.

Describe the solution you'd like
Since I didn't find this behaviour in en-GB, I would suggest to also disable this rule in German.

Describe alternatives you've considered
I tried to hide these cases as false positives, but at a large scale it becomes quite bothersome.

Additional context

Screenshot A Screenshot B

valentjn commented 2 years ago

I can't reproduce this with default settings, only when using picky rules (via ltex.additionalRules.enablePickyRules). Are you using picky rules? If yes, then this is why these rules are called picky and also why they're disabled by default, as they result in more false positives.

Apart from this, the diagnostic is triggered by the period after the section number 4.1.2. According to DIN 5008, you shouldn't insert a period after the section number anyway (see here and here), so that diagnostic will vanish. (In general, I'd advise against manual section numbers and let Pandoc or whatever viewer/tool you're using take care of that, but that's a matter of personal taste.)

TimTechDev commented 2 years ago

Thanks for answering to my issue :)

Are you using picky rules?

Now that you ask, yes. I may have enabled it, since the description of the setting mentions stuff I want to avoid, like sentence length. May I suggest adding a part about false positives in this description, since this wasn't obvious to me.

According to DIN 5008, you shouldn't insert a period after the section number anyway (see here and here), so that diagnostic will vanish.

I didn't know that. And yes the deletion of the period removes the warning.

In general, I'd advise against manual section numbers and let Pandoc or whatever viewer/tool you're using take care of that, but that's a matter of personal taste.

That wasn't possible in this case. Usually I also let my computer do it.

valentjn commented 2 years ago

Added a hint about more false positives to the docs. Thanks for the suggestion.

valentjn commented 2 years ago

Docs fixed in 12.0.0.