Skip to content

Commit

Permalink
fix: fix long string highlight and pairs (#52)
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa authored Jun 25, 2024
1 parent 1d0a835 commit 388bea6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
6 changes: 2 additions & 4 deletions language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "#",
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"blockComment": [ "\"\"\"", "\"\"\"" ]
},
// symbols used as brackets
"brackets": [
Expand All @@ -18,7 +16,7 @@
["(", ")"],
["\"", "\""],
["'", "'"],
["\"\"\", \"\"\""],
["\"\"\"", "\"\"\""],
["'''", "'''"]
],
// symbols that can be used to surround a selection
Expand All @@ -28,7 +26,7 @@
["(", ")"],
["\"", "\""],
["'", "'"],
["\"\"\", \"\"\""],
["\"\"\"", "\"\"\""],
["'''", "'''"]
],
"folding": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "kcl",
"displayName": "KCL",
"description": "Language extension for KCL",
"version": "0.1.8",
"version": "0.1.9",
"engines": {
"vscode": "^1.63.0"
},
Expand Down
32 changes: 18 additions & 14 deletions syntaxes/KCL.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
{
"include": "#builtin-literals"
},
{
"include": "#triple-double-quoted-strings"
},
{
"include": "#triple-single-quoted-strings"
},
{
"include": "#single-quoted-strings"
},
Expand Down Expand Up @@ -43,27 +49,25 @@
"match": "\\b(True|False|None|Undefined)\\b"
}]
},
"triple-double-quoted-strings": {
"name": "string.quoted.double.triple.KCL",
"begin": "\"\"\"",
"end": "\"\"\""
},
"triple-single-quoted-strings": {
"name": "string.quoted.single.triple.KCL",
"begin": "'''",
"end": "'''"
},
"single-quoted-strings": {
"name": "string.quoted.single.KCL",
"begin": "'",
"end": "'",
"patterns": [
{
"name": "constant.character.escape.KCL",
"match": "\\\\."
}
]
"end": "'"
},
"double-quoted-strings": {
"name": "string.quoted.double.KCL",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.KCL",
"match": "\\\\."
}
]
"end": "\""
},
"comment": {
"name": "comment.line.number-sign.KCL",
Expand Down

0 comments on commit 388bea6

Please sign in to comment.