editor: add plain language with no grammar

This commit is contained in:
2026-11-11 09:41:56 +07:00
parent 63ed15c9cb
commit 65509ccde1
3 changed files with 19 additions and 1 deletions
+2 -1
View File
@@ -52,9 +52,10 @@ impl Role {
#[cfg(feature = "markdown")]
impl Language {
/// Maps a fence info string to a bundled grammar.
/// Maps a fence info string to a language.
pub(crate) fn from_fence_info(info: &str) -> Option<Language> {
match info.to_ascii_lowercase().as_str() {
"plain" | "text" | "txt" => Some(Language::Plain),
"rust" | "rs" => Some(Language::Rust),
"typescript" | "ts" => Some(Language::TypeScript),
"javascript" | "js" => Some(Language::JavaScript),