Skip to content

Commit 10daf04

Browse files
authored
Add .json5 to json Lexer (#1224)
Technically the JSON lexer is not ideal for json5 but I observe many people writing valid json or jsonc into `.json5` files ([random example](https://github.com/it-at-m/refarch/blob/main/renovate.json5)) so I think it's worth adding it. Here is a rendering of a JSON5 file with all features: <img width="593" height="355" alt="image" src="https://github.com/user-attachments/assets/5248d3fe-954d-4a3f-9180-38bbe1260fe6" />
1 parent dccba78 commit 10daf04

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lexers/embedded/json.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<alias>json</alias>
55
<filename>*.json</filename>
66
<filename>*.jsonc</filename>
7+
<filename>*.json5</filename>
78
<filename>*.avsc</filename>
89
<mime_type>application/json</mime_type>
910
<dot_all>true</dot_all>

0 commit comments

Comments
 (0)