mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 00:51:56 +00:00 
			
		
		
		
	Merge pull request #3209 from sharkdp/ndjson
Add mapping for ndjson file extension to JSON syntax
This commit is contained in:
		@@ -19,6 +19,7 @@
 | 
				
			|||||||
- Add syntax mapping for `nix`'s '`flake.lock` lockfiles #3196 (@odilf)
 | 
					- 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-
 | 
					- 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)
 | 
					- Improve (Sys)log error highlighting, see #3205 (@keith-hall)
 | 
				
			||||||
 | 
					- Map `ndjson` extension to JSON syntax, see #3209 (@keith-hall)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Themes
 | 
					## Themes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,3 @@
 | 
				
			|||||||
# JSON Lines is a simple variation of JSON #2535
 | 
					# JSON Lines is a simple variation of JSON #2535
 | 
				
			||||||
[mappings]
 | 
					[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"]}}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user