mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 00:51:56 +00:00 
			
		
		
		
	Merge pull request #3300 from cskeeters/syntax_typst
Adds Typst syntax from hyrious/typst-syntax-highlight
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							@@ -269,3 +269,6 @@
 | 
			
		||||
[submodule "assets/syntaxes/02_Extra/sublime-odin"]
 | 
			
		||||
	path = assets/syntaxes/02_Extra/sublime-odin
 | 
			
		||||
	url = https://github.com/odin-lang/sublime-odin
 | 
			
		||||
[submodule "assets/syntaxes/02_Extra/typst-syntax-highlight"]
 | 
			
		||||
	path = assets/syntaxes/02_Extra/typst-syntax-highlight
 | 
			
		||||
	url = https://github.com/hyrious/typst-syntax-highlight
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@
 | 
			
		||||
- Add syntax definition and test file for GDScript highlighting, see #3236 (@chetanjangir0)
 | 
			
		||||
- Add syntax test file for Odin highlighting, see #3241 (@chetanjangir0)
 | 
			
		||||
- Update quadlet syntax mapping rules to cover quadlets in subdirectories #3299 (@cyqsimon)
 | 
			
		||||
- Add syntax Typst #3300 (@cskeeters)
 | 
			
		||||
 | 
			
		||||
## Themes
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								assets/syntaxes/02_Extra/typst-syntax-highlight
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								assets/syntaxes/02_Extra/typst-syntax-highlight
									
									
									
									
										vendored
									
									
										Submodule
									
								
							 Submodule assets/syntaxes/02_Extra/typst-syntax-highlight added at 1bde1ea511
									
								
							
							
								
								
									
										28
									
								
								tests/syntax-tests/highlighted/Typst/test.typ
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								tests/syntax-tests/highlighted/Typst/test.typ
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
[38;2;249;38;114m#[0m[38;2;249;38;114mset[0m[38;2;248;248;242m [0m[38;2;102;217;239mtext[0m[38;2;248;248;242m([0m[38;2;190;132;255m9[0m[38;2;190;132;255m.[0m[38;2;190;132;255m5[0m[38;2;190;132;255mpt[0m[38;2;248;248;242m)[0m
 | 
			
		||||
 | 
			
		||||
[38;2;253;151;31m=[0m[38;2;253;151;31m [0m[38;2;253;151;31mHeading[0m
 | 
			
		||||
 | 
			
		||||
[38;2;248;248;242m-[0m[38;2;248;248;242m [0m[38;2;248;248;242mBullet 1[0m
 | 
			
		||||
[38;2;248;248;242m-[0m[38;2;248;248;242m [0m[38;2;248;248;242mBullet 2[0m
 | 
			
		||||
[38;2;248;248;242m-[0m[38;2;248;248;242m [0m[38;2;248;248;242mBullet 3[0m
 | 
			
		||||
 | 
			
		||||
[38;2;248;248;242m+[0m[38;2;248;248;242m [0m[38;2;248;248;242mList 1[0m
 | 
			
		||||
[38;2;248;248;242m+[0m[38;2;248;248;242m [0m[38;2;248;248;242mList 2[0m
 | 
			
		||||
[38;2;248;248;242m+[0m[38;2;248;248;242m [0m[38;2;248;248;242mList 3[0m
 | 
			
		||||
 | 
			
		||||
[38;2;248;248;242m#[0m[38;2;248;248;242mfigure[0m[38;2;248;248;242m([0m
 | 
			
		||||
[38;2;248;248;242m  [0m[38;2;102;217;239mtable[0m[38;2;248;248;242m([0m
 | 
			
		||||
[38;2;248;248;242m    [0m[3;38;2;253;151;31mcolumns[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;190;132;255mauto[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255mauto[0m[38;2;248;248;242m)[0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m    table[0m[38;2;248;248;242m.[0m[38;2;102;217;239mheader[0m[38;2;248;248;242m([0m
 | 
			
		||||
[38;2;248;248;242m        [0m[38;2;248;248;242m[[0m[38;2;248;248;242mName[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;248;248;242mAge[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m    [0m[38;2;248;248;242m)[0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m    [0m[38;2;248;248;242m[[0m[38;2;248;248;242mJohn[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;248;248;242m50[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m    [0m[38;2;248;248;242m[[0m[38;2;248;248;242mJane[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;248;248;242m48[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m  [0m[38;2;248;248;242m)[0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m  [0m[3;38;2;253;151;31mcaption[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;248;248;242mPeople[0m[38;2;248;248;242m][0m[38;2;248;248;242m,[0m
 | 
			
		||||
[38;2;248;248;242m)[0m
 | 
			
		||||
 | 
			
		||||
[38;2;248;248;242m```[0m[38;2;190;132;255mpython[0m
 | 
			
		||||
[38;2;249;38;114mdef[0m[38;2;174;129;255m [0m[38;2;166;226;46mfoo[0m[38;2;174;129;255m([0m[38;2;174;129;255m)[0m[38;2;174;129;255m:[0m
 | 
			
		||||
[38;2;174;129;255m  [0m[38;2;102;217;239mprint[0m[38;2;174;129;255m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mhi[0m[38;2;230;219;116m"[0m[38;2;174;129;255m)[0m
 | 
			
		||||
[38;2;248;248;242m```[0m
 | 
			
		||||
							
								
								
									
										28
									
								
								tests/syntax-tests/source/Typst/test.typ
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								tests/syntax-tests/source/Typst/test.typ
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
#set text(9.5pt)
 | 
			
		||||
 | 
			
		||||
= Heading
 | 
			
		||||
 | 
			
		||||
- Bullet 1
 | 
			
		||||
- Bullet 2
 | 
			
		||||
- Bullet 3
 | 
			
		||||
 | 
			
		||||
+ List 1
 | 
			
		||||
+ List 2
 | 
			
		||||
+ List 3
 | 
			
		||||
 | 
			
		||||
#figure(
 | 
			
		||||
  table(
 | 
			
		||||
    columns: (auto, auto),
 | 
			
		||||
    table.header(
 | 
			
		||||
        [Name], [Age],
 | 
			
		||||
    ),
 | 
			
		||||
    [John], [50],
 | 
			
		||||
    [Jane], [48],
 | 
			
		||||
  ),
 | 
			
		||||
  caption: [People],
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
def foo():
 | 
			
		||||
  print("hi")
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user