-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Twig tags within quoted strings can contain same sort of quotes. This requires another strategy of handling embedded code blocks especially in inline event and style attributes. Solution is borrowed from PHP.
- Loading branch information
Showing
6 changed files
with
219 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
%YAML 1.2 | ||
--- | ||
scope: source.css.embedded.string.quoted.double.twig | ||
version: 2 | ||
hidden: true | ||
|
||
extends: CSS (Twig).sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- match: (?=") | ||
pop: 1 | ||
|
||
main: | ||
- include: rule-list-body |
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,16 @@ | ||
%YAML 1.2 | ||
--- | ||
scope: source.css.embedded.string.quoted.single.twig | ||
version: 2 | ||
hidden: true | ||
|
||
extends: CSS (Twig).sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- match: (?=') | ||
pop: 1 | ||
|
||
main: | ||
- include: rule-list-body |
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
16 changes: 16 additions & 0 deletions
16
Syntaxes/JavaScript/JavaScript (for HTML double-quoted).sublime-syntax
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,16 @@ | ||
%YAML 1.2 | ||
--- | ||
scope: source.js.embedded.string.quoted.double.twig | ||
version: 2 | ||
hidden: true | ||
|
||
extends: JavaScript (Twig).sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- match: (?=") | ||
pop: 1 | ||
|
||
main: | ||
- include: expressions |
16 changes: 16 additions & 0 deletions
16
Syntaxes/JavaScript/JavaScript (for HTML single-quoted).sublime-syntax
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,16 @@ | ||
%YAML 1.2 | ||
--- | ||
scope: source.js.embedded.string.quoted.single.twig | ||
version: 2 | ||
hidden: true | ||
|
||
extends: JavaScript (Twig).sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- match: (?=') | ||
pop: 1 | ||
|
||
main: | ||
- include: expressions |