mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Fix PHP in HTML style tags
This commit is contained in:
parent
31b011f831
commit
dd02755bfc
|
@ -8,8 +8,9 @@ const updateGrammar = require('../../../build/npm/update-grammar');
|
||||||
|
|
||||||
function adaptInjectionScope(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
|
// 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 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 injections = grammar.injections;
|
||||||
const injection = injections[oldInjectionKey];
|
const injection = injections[oldInjectionKey];
|
||||||
|
|
Loading…
Reference in a new issue