vscode-spellright
vscode-spellright copied to clipboard
Code being spellchecked on C++ lines with double and single quotes.
spellright Version: 3.0.104 VS Code Version: 1.74.1 (system setup) Windows 10
Spellright shows 'endl' misspelled in this line:
clog << "getopt() returned ':' optopt = '" << static_cast<char>(optopt) << "'" << endl;
Workaround: Do not mix double and single quotes on the same line. E.g., if you write this:
clog << "Error: 'SpellRight error with double and single quote '" << endl;
Write this instead:
clog << "Error: \"SpellRight error with double and single quote \"" << endl;
This problem still occurs in v3.0.112 and is (maybe) worse. That is, endl
is marked as misspelled in the following.
cout "\"" << "some text" << "\"" << endl;
cout "\"" << argv[0] << "\"" << endl;
But not in this:
cout "\"some text\"" << endl;
The general workaround is to break the line. That is, write it like this:
cout "\"" << "some text" << "\""
<< endl;
cout "\"" << argv[0] << "\""
<< endl;