From 5c634c2aed413df2541942316afa7d959556cddd Mon Sep 17 00:00:00 2001 From: witchard Date: Mon, 2 Sep 2024 13:49:42 +0100 Subject: [PATCH] Add TOML highlighting. Resolves #360. --- src/processing/code.rs | 2 ++ src/render/highlighting.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/processing/code.rs b/src/processing/code.rs index 08e33611..95487871 100644 --- a/src/processing/code.rs +++ b/src/processing/code.rs @@ -461,6 +461,7 @@ pub enum SnippetLanguage { Swift, Svelte, Terraform, + Toml, TypeScript, Typst, Unknown(String), @@ -527,6 +528,7 @@ impl FromStr for SnippetLanguage { "svelte" => Svelte, "swift" => Swift, "terraform" => Terraform, + "toml" => Toml, "typescript" | "ts" => TypeScript, "typst" => Typst, "xml" => Xml, diff --git a/src/render/highlighting.rs b/src/render/highlighting.rs index 8843fcb5..45acfaf0 100644 --- a/src/render/highlighting.rs +++ b/src/render/highlighting.rs @@ -152,6 +152,7 @@ impl CodeHighlighter { Swift => "swift", Svelte => "svelte", Terraform => "tf", + Toml => "toml", TypeScript => "ts", Typst => "txt", // default to plain text so we get the same look&feel