oak_markdown/language/
mod.rs

1use oak_core::{Language, LanguageCategory};
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4pub struct MarkdownLanguage {
5    pub allow_math: bool,
6}
7
8impl Language for MarkdownLanguage {
9    const NAME: &'static str = "markdown";
10    const CATEGORY: LanguageCategory = LanguageCategory::Markup;
11
12    type TokenType = crate::kind::MarkdownSyntaxKind;
13    type ElementType = crate::kind::MarkdownSyntaxKind;
14    type TypedRoot = crate::ast::MarkdownRoot;
15}
16
17impl Default for MarkdownLanguage {
18    fn default() -> Self {
19        Self { allow_math: false }
20    }
21}