mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 20:38:44 +00:00
Add mapping for ndjson file extension to JSON syntax
This commit is contained in:
parent
94d3dc254e
commit
2843a2c0e8
@ -19,6 +19,7 @@
|
||||
- Add syntax mapping for `nix`'s '`flake.lock` lockfiles #3196 (@odilf)
|
||||
- Improvements to CSV/TSV highlighting, with autodetection of delimiter and support for TSV files, see #3186 (@keith-
|
||||
- Improve (Sys)log error highlighting, see #3205 (@keith-hall)
|
||||
- Map `ndjson` extension to JSON syntax, see #3209 (@keith-hall)
|
||||
|
||||
## Themes
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
# JSON Lines is a simple variation of JSON #2535
|
||||
[mappings]
|
||||
"JSON" = ["*.jsonl", "*.jsonc", "*.jsonld", "*.geojson"]
|
||||
"JSON" = ["*.jsonl", "*.jsonc", "*.jsonld", "*.geojson", "*.ndjson"]
|
||||
|
3
tests/syntax-tests/highlighted/JSON/example.ndjson
vendored
Normal file
3
tests/syntax-tests/highlighted/JSON/example.ndjson
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[38;2;248;248;242m{[0m[38;2;253;151;31m"[0m[38;2;253;151;31msome[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;230;219;116m"[0m[38;2;230;219;116mthing[0m[38;2;230;219;116m"[0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m{[0m[38;2;253;151;31m"[0m[38;2;253;151;31mfoo[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;190;132;255m17[0m[38;2;248;248;242m,[0m[38;2;253;151;31m"[0m[38;2;253;151;31mbar[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;190;132;255mfalse[0m[38;2;248;248;242m,[0m[38;2;253;151;31m"[0m[38;2;253;151;31mquux[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;190;132;255mtrue[0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m{[0m[38;2;253;151;31m"[0m[38;2;253;151;31mmay[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;248;248;242m{[0m[38;2;253;151;31m"[0m[38;2;253;151;31minclude[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;230;219;116m"[0m[38;2;230;219;116mnested[0m[38;2;230;219;116m"[0m[38;2;248;248;242m,[0m[38;2;253;151;31m"[0m[38;2;253;151;31mobjects[0m[38;2;253;151;31m"[0m[38;2;248;248;242m:[0m[38;2;248;248;242m[[0m[38;2;230;219;116m"[0m[38;2;230;219;116mand[0m[38;2;230;219;116m"[0m[38;2;248;248;242m,[0m[38;2;230;219;116m"[0m[38;2;230;219;116marrays[0m[38;2;230;219;116m"[0m[38;2;248;248;242m][0m[38;2;248;248;242m}[0m[38;2;248;248;242m}[0m
|
3
tests/syntax-tests/source/JSON/example.ndjson
vendored
Normal file
3
tests/syntax-tests/source/JSON/example.ndjson
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{"some":"thing"}
|
||||
{"foo":17,"bar":false,"quux":true}
|
||||
{"may":{"include":"nested","objects":["and","arrays"]}}
|
Loading…
x
Reference in New Issue
Block a user