dustinblackman / languagetool-code-comments

languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments!
MIT License
31 stars 4 forks source link

Comments sent to LanguageTool are not stripped of their language-specific comment marks #3

Open vertgarou opened 1 year ago

vertgarou commented 1 year ago

For instance, for https://github.com/dustinblackman/languagetool-code-comments/blob/main/tests/fixtures/astro.astro#L7, the text that gets sent to the LanguageTool server for analysis is <!-- I am a comment number two. -->, where I would have expected that I am a comment number two. be sent. This can result in LanguageTool reporting various language issues, such as a Do you wish to insert an arrow? typography issue.

Although I understand that stripping the language-specific comment marks may not be trivial (because it is language-specific), the current behaviour is surely not optimal.