-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSS Extras & PHP: Fixed too greedy number token (#2009)
This fixes the too greedy number tokenization of CSS Extras which cause the placeholders of PHP (via markup templating) to be partly tokenized. The CSS extras number pattern was adjusted to solve the issue.
- Loading branch information
1 parent
e2b99f4
commit ebe363f
Showing
4 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<img style="width:<?php echo (80 / count($images)) ?>%"/> | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "<"], | ||
"img" | ||
]], | ||
["style-attr", [ | ||
["attr-name", [ | ||
["attr-name", [ | ||
"style" | ||
]] | ||
]], | ||
["punctuation", "=\""], | ||
["attr-value", [ | ||
["property", "width"], | ||
["punctuation", ":"], | ||
["php", [ | ||
["delimiter", "<?php"], | ||
["keyword", "echo"], | ||
["punctuation", "("], | ||
["number", "80"], | ||
["operator", "/"], | ||
["function", "count"], | ||
["punctuation", "("], | ||
["variable", "$images"], | ||
["punctuation", ")"], | ||
["punctuation", ")"], | ||
["delimiter", "?>"] | ||
]], | ||
"%" | ||
]], | ||
["punctuation", "\""] | ||
]], | ||
["punctuation", "/>"] | ||
]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for #2008 where a part of markup templating's placeholder was tokenized as `number` by CSS Extras. |