EWSoftware / VSSpellChecker

A Visual Studio spell checker editor extension that checks the spelling of comments, strings, and plain text as you type. Supports configuration and various languages.
Other
377 stars 65 forks source link

CSHTML files not being fully spellchecked. #251

Closed hjgermain closed 2 years ago

hjgermain commented 2 years ago

the following code is from a cshtml file. The C# @{} "code" is checked and "mispelled" is found. The rest of the file (e.g., notfound) is not seen as incorrect.

<body>

    notfound

    @{
        // mispelled 
    }

</body>
EWSoftware commented 2 years ago

Many of these are dependent on the project type and how the editor interacts with them. Can you provide a small example project that demonstrates the issue?

hjgermain commented 2 years ago

Visual Studio 2022 Visual Studio Spell Checker 2022+ extension Create new project asp.net core web app MVC take a look at Views/Home/Index.cshtml

WebApplication3.zip

EWSoftware commented 2 years ago

I had to associate the HTML tagger with the Razor content type so that it handles the inner text elements. It'll be fixed in the next release due out soon. That said, the classifier for the Razor content type works oddly in VS 2022. It appears to classify the text out of sequence. As such, you will likely see it spell check attribute values that it previously ignored even though they're not in the list of included attributes to spell check. Unfortunately, that isn't something I have control over.