Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
feat: unite comment patterns
  • Loading branch information
TomPavelec committed Oct 13, 2020
1 parent 39bbd69 commit 2f0b21e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
5 changes: 0 additions & 5 deletions components/prism-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
alias: 'important'
},
'comment': [
/\/\*\*\//,
{
pattern: /\/\*\*[\s\S]*?\*\//,
alias: 'doc-comment'
},
/\/\*[\s\S]*?\*\/|\/\/.*|#.*/
],
'variable': /\$+(?:\w+\b|(?={))/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-php.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/languages/latte/html_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
["tag", [["tag", [["punctuation", "<"], "a"]],
["attr-name", ["href"]], ["attr-value", [["punctuation", "="], ["punctuation", "\""],
["latte", [["ld", [["punctuation", "{"], ["tag", "link"]]],
["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "->"], ["property", "id"]]],
["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]],
["rd", [["punctuation", "}"]]]]],
["punctuation", "\""]]], ["punctuation", ">"]]],
["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "->"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]],
Expand Down
4 changes: 2 additions & 2 deletions tests/languages/latte/n-attr_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
[
["tag", [["tag", [["punctuation", "<"], "a"]],
["n-attr", [["attr-name", "n:href"],
["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]],
["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]],
["punctuation", ">"]]],
"link", ["tag", [["tag", [["punctuation", "</"], "a"]], ["punctuation", ">"]]],

["tag", [["tag", [["punctuation", "<"], "a"]],
["n-attr", [["attr-name", "n:href"],
["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]],
["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]],
["punctuation", ">"]]],
"link", ["tag", [["tag", [["punctuation", "</"], "a"]], ["punctuation", ">"]]],

Expand Down
8 changes: 5 additions & 3 deletions tests/languages/php/property_feature.test
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
$variable->property
$foo->bar->baz
$variable->property;
$foo->bar->baz;

----------------------------------------------------

[
["variable", "$variable"],
["operator", "->"],
["property", "property"],
["punctuation", ";"],
["variable", "$foo"],
["operator", "->"],
["property", "bar"],
["operator", "->"],
["property", "baz"]
["property", "baz"],
["punctuation", ";"]
]

----------------------------------------------------
Expand Down

0 comments on commit 2f0b21e

Please sign in to comment.