diff options
author | Léana 江 <87855546+leana8959@users.noreply.github.com> | 2024-05-02 18:23:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 18:23:35 +0200 |
commit | 8a945792cafe107931c764d1a3fd63bf16ff48d7 (patch) | |
tree | 8457fc23c12e205a06b57e834a634346605a3338 | |
parent | 3ac268d00d2402b63f5e0a74401fa4c8df1eb926 (diff) |
add: typst (#1037)
-rw-r--r-- | languages.json | 7 | ||||
-rw-r--r-- | tests/data/typst.typ | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/languages.json b/languages.json index dd18c7e..2c194f8 100644 --- a/languages.json +++ b/languages.json @@ -1547,6 +1547,13 @@ "quotes": [["\\\"", "\\\""], ["'", "'"], ["`", "`"]], "extensions": ["ts", "mts", "cts"] }, + "Typst": { + "nested": true, + "line_comment": ["//"], + "multi_line_comments": [["/*", "*/"]], + "quotes": [["\\\"", "\\\""]], + "extensions": ["typ"] + }, "UMPL": { "line_comment": ["!"], "quotes": [["`", "`"]], diff --git a/tests/data/typst.typ b/tests/data/typst.typ new file mode 100644 index 0000000..f488999 --- /dev/null +++ b/tests/data/typst.typ @@ -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) |