mirror of
https://github.com/sharkdp/bat.git
synced 2025-05-28 21:57:52 +02:00
Adds Typst syntax from hyrious/typst-syntax-highlight
This commit is contained in:
parent
aa5e28bef5
commit
fb514ca90f
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
|
||||
|
1
assets/syntaxes/02_Extra/typst-syntax-highlight
vendored
Submodule
1
assets/syntaxes/02_Extra/typst-syntax-highlight
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1bde1ea511d86c622a0fd27d9e0db3e047d4094f
|
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;174;129;255mdev[0m[38;2;174;129;255m [0m[38;2;174;129;255mfoo[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
|
||||
dev foo():
|
||||
print("hi")
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user