Skip to content
Snippets Groups Projects
Commit c58e5a0c authored by Klaus Purer's avatar Klaus Purer
Browse files

fix(InlineCommen): Allow spellchecker keyword (#3424914)

parent 05c5367e
No related branches found
No related tags found
No related merge requests found
......@@ -351,7 +351,7 @@ class InlineCommentSniff implements Sniff
// Also, when the comment starts with cspell: don't check the end of the
// comment.
if (preg_match('/^\p{L}/u', $commentText) === 1
&& preg_match('/(cspell|spell\-checker):/i', $commentText) === 0
&& preg_match('/(cspell|spell\-checker|spellchecker):/i', $commentText) === 0
) {
$commentCloser = $commentText[(strlen($commentText) - 1)];
$acceptedClosers = [
......
......@@ -126,3 +126,6 @@ $x = 2;
// And here as well.
// spell-checker:ignore bananarama
$x = 3;
// Different keword.
// spellchecker:disable-next-line
$x = 4;
......@@ -125,3 +125,6 @@ $x = 2;
// And here as well.
// spell-checker:ignore bananarama
$x = 3;
// Different keword.
// spellchecker:disable-next-line
$x = 4;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment