From 2dd1a02e1ce43640f442e1b6592441c5f8407bb9 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Mon, 14 Apr 2025 20:44:00 +0200 Subject: [PATCH] Suppress warnings for ```text code blocks --- config.toml | 1 + syntaxes/custom_plain_text.sublime-syntax | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 syntaxes/custom_plain_text.sublime-syntax diff --git a/config.toml b/config.toml index cecde4b51..32b0acd6c 100644 --- a/config.toml +++ b/config.toml @@ -11,6 +11,7 @@ highlight_code = true highlight_theme = "boron" bottom_footnotes = true insert_anchor_links = "left" +extra_syntaxes_and_themes = ["syntaxes"] [extra] # Put all your custom variables here diff --git a/syntaxes/custom_plain_text.sublime-syntax b/syntaxes/custom_plain_text.sublime-syntax new file mode 100644 index 000000000..a82737ee0 --- /dev/null +++ b/syntaxes/custom_plain_text.sublime-syntax @@ -0,0 +1,14 @@ +%YAML 1.2 +--- +name: Plain Text +file_extensions: [text] +scope: text.plain + +# This custom syntax for plain text only exists so we can match against ```text +# code blocks, which are common in rustdoc. By default, only ```txt is supported +# by Zola. Without this file, `zola build` would print spurious warnings. + +contexts: + main: + - match: whatever + scope: text.plain