Skip to content

Commit

Permalink
syntax/json: Add comment support to the syntax highlighting (#3434)
Browse files Browse the repository at this point in the history
* allow comments in json

* syntax/json: Add colon to `TODO` comments

---------

Co-authored-by: Sertonix <[email protected]>
  • Loading branch information
JoeKar and sertonix authored Aug 19, 2024
1 parent f74eb23 commit cc195b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions runtime/syntax/json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ rules:

- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
- constant: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"

- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"

- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"

0 comments on commit cc195b6

Please sign in to comment.