Skip to content

Commit

Permalink
Revert "Revert "Merge pull request #80657 from KapitanOczywisty/patch…
Browse files Browse the repository at this point in the history
…-1""

CLA signed, bring back PR

This reverts commit 0e8a10a.
  • Loading branch information
roblourens committed Sep 15, 2019
1 parent 0e8a10a commit d378003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion extensions/php/build/update-grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ const updateGrammar = require('../../../build/npm/update-grammar');

function adaptInjectionScope(grammar) {
// we're using the HTML grammar from https://github.com/textmate/html.tmbundle which has moved away from source.js.embedded.html
// also we need to add source.css scope for PHP code in <style> tags, which are handled differently in atom
const oldInjectionKey = "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js.embedded.html - (meta.embedded.block.php | meta.embedded.line.php))";
const newInjectionKey = "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php))";
const newInjectionKey = "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))";

const injections = grammar.injections;
const injection = injections[oldInjectionKey];
Expand Down
2 changes: 1 addition & 1 deletion extensions/php/syntaxes/html.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}
]
},
"text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php))": {
"text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))": {
"patterns": [
{
"include": "#php-tag"
Expand Down

0 comments on commit d378003

Please sign in to comment.