Skip to content

Commit cc195b6

Browse files
JoeKarsertonix
andauthored
syntax/json: Add comment support to the syntax highlighting (#3434)
* allow comments in json * syntax/json: Add colon to `TODO` comments --------- Co-authored-by: Sertonix <83883937+Sertonix@users.noreply.github.com>
1 parent f74eb23 commit cc195b6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

runtime/syntax/json.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,15 @@ rules:
2525

2626
- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
2727
- constant: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
28+
29+
- comment:
30+
start: "//"
31+
end: "$"
32+
rules:
33+
- todo: "(TODO|XXX|FIXME):?"
34+
35+
- comment:
36+
start: "/\\*"
37+
end: "\\*/"
38+
rules:
39+
- todo: "(TODO|XXX|FIXME):?"

0 commit comments

Comments
 (0)