Skip to content

Commit fe34692

Browse files
committed
feat: add shell syntax highlighting in string blocks by default
1 parent a3cb25c commit fe34692

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

syntaxes/toml-language.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": "1.0.0",
33
"scopeName": "source.toml",
44
"information_for_contributors": [
5-
"Copied from TOMBI (MIT). https://github.com/tombi-toml/tombi/blob/main/editors/vscode/syntaxes/toml.tmLanguage.json MIT License\n\nCopyright (c) 2024 tombi-toml\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
5+
"Adapted from TOMBI (MIT). https://github.com/tombi-toml/tombi/blob/main/editors/vscode/syntaxes/toml.tmLanguage.json MIT License\n\nCopyright (c) 2024 tombi-toml\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
66
],
77
"patterns": [
88
{
@@ -27,6 +27,22 @@
2727
},
2828
"value": {
2929
"patterns": [
30+
{
31+
"name": "string.quoted.triple.basic.run.block.toml",
32+
"begin": "\\s*run\\s*=\\s*\"\"\"",
33+
"end": "\"\"\"",
34+
"patterns": [
35+
{
36+
"match": "\\\\([btnfr\"\\\\\\n/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})",
37+
"name": "constant.character.escape.toml"
38+
},
39+
{
40+
"match": "\\\\[^btnfr/\"\\\\\\n]",
41+
"name": "invalid.illegal.escape.toml"
42+
},
43+
{ "include": "source.shell" }
44+
]
45+
},
3046
{
3147
"name": "string.quoted.triple.basic.block.toml",
3248
"begin": "\"\"\"",
@@ -57,6 +73,12 @@
5773
}
5874
]
5975
},
76+
{
77+
"name": "string.quoted.triple.literal.run.block.toml",
78+
"begin": "\\s*run\\s*=\\s*'''",
79+
"end": "'''",
80+
"patterns": [{ "include": "source.shell" }]
81+
},
6082
{
6183
"name": "string.quoted.triple.literal.block.toml",
6284
"begin": "'''",

0 commit comments

Comments
 (0)