Skip to content

Commit

Permalink
Fix parsing of minified JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Dec 1, 2024
1 parent 51e6021 commit a528726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions syntaxes/JSON.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"patterns": [
{
"begin": "(?=\"((?>[^\\\\\"]++|\\\\.)*+)\")",
"end": "(?<=,)|(?=})",
"end": "(?!\\G)(?<=,)|(?=})",
"name": ".$1.",
"patterns": [ { "include": "#objectpair" } ]
},
Expand All @@ -80,8 +80,8 @@
{
"begin": ":",
"beginCaptures": { "0": { "name": "punctuation.separator.dictionary.key-value.json" } },
"end": "(,)|(?=})",
"endCaptures": { "1": { "name": "punctuation.separator.dictionary.pair.json" } },
"end": ",|(?=})",
"endCaptures": { "0": { "name": "punctuation.separator.dictionary.pair.json" } },
"name": "meta.structure.dictionary.value.json",
"patterns": [
{
Expand Down
6 changes: 3 additions & 3 deletions syntaxes/JSONC.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"patterns": [
{
"begin": "(?=\"((?>[^\\\\\"]++|\\\\.)*+)\")",
"end": "(?<=,)|(?=})",
"end": "(?!\\G)(?<=,)|(?=})",
"name": ".$1.",
"patterns": [ { "include": "#objectpair" } ]
},
Expand All @@ -80,8 +80,8 @@
{
"begin": ":",
"beginCaptures": { "0": { "name": "punctuation.separator.dictionary.key-value.json.comments" } },
"end": "(,)|(?=})",
"endCaptures": { "1": { "name": "punctuation.separator.dictionary.pair.json.comments" } },
"end": ",|(?=})",
"endCaptures": { "0": { "name": "punctuation.separator.dictionary.pair.json.comments" } },
"name": "meta.structure.dictionary.value.json.comments",
"patterns": [
{
Expand Down

0 comments on commit a528726

Please sign in to comment.