Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@
}
/* phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines false */

// /**
// * This text is in two types of comment: each line is commented out
// * individually, and the whole block is in what looks like a
// * docblock-comment. This sniff should ignore all this text as there
// * is no superfluous white-space here.
// */

Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@
float: left;
}
/* phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines false */

// /**
// * This text is in two types of comment: each line is commented out
// * individually, and the whole block is in what looks like a
// * docblock-comment. This sniff should ignore all this text as there
// * is no superfluous white-space here.
// */
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getErrorList($testFile='SuperfluousWhitespaceUnitTest.inc')
8 => 1,
9 => 1,
11 => 1,
25 => 1,
32 => 1,
];
break;
default:
Expand Down
6 changes: 5 additions & 1 deletion src/Tokenizers/CSS.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ public function tokenize($string)

// The first and last tokens are the open/close tags.
array_shift($commentTokens);
array_pop($commentTokens);
$closeTag = array_pop($commentTokens);

while ($closeTag['content'] !== '?'.'>') {
$closeTag = array_pop($commentTokens);
}

if ($leadingZero === true) {
$commentTokens[0]['content'] = substr($commentTokens[0]['content'], 1);
Expand Down