Skip to content

Commit

Permalink
add: typst (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
leana8959 authored May 2, 2024
1 parent 3ac268d commit 8a94579
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,13 @@
"quotes": [["\\\"", "\\\""], ["'", "'"], ["`", "`"]],
"extensions": ["ts", "mts", "cts"]
},
"Typst": {
"nested": true,
"line_comment": ["//"],
"multi_line_comments": [["/*", "*/"]],
"quotes": [["\\\"", "\\\""]],
"extensions": ["typ"]
},
"UMPL": {
"line_comment": ["!"],
"quotes": [["`", "`"]],
Expand Down
16 changes: 16 additions & 0 deletions tests/data/typst.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 16 lines 9 code 3 comments 4 blanks

// Some example settings
#set document(title: "a title", author: "an author")
#set page(numbering: "1 / 1", number-align: center)
#set par(justify: true)
#set text(size: 13pt, lang: "fr") // with a trailing comment
#set heading(numbering: "1.1") /* with another trailing comment */

#let foo = "multiline
string"

#let bar = "singleline string"

/* comment */ /* nested /* comment */ */
#lorem(50)

0 comments on commit 8a94579

Please sign in to comment.