Skip to main content

INJECTIONS_QUERY

Constant INJECTIONS_QUERY 

Source
pub const INJECTIONS_QUERY: &str = "; Mosaic language injections.\n;\n; The inline math body uses LaTeX-like syntax (manifest \u{a7}6), so we inject a\n; latex parser when available. The `#offset!` predicate strips the `$`\n; delimiters so the embedded parser sees pure math source.\n\n((inline_math) @injection.content\n  (#set! injection.language \"latex\")\n  (#offset! @injection.content 0 1 0 -1))\n\n((code_block\n   arguments: (argument_list\n     (attribute\n       key: (identifier) @_k\n       value: (string [\n         (string_double_content)\n         (string_single_content)\n       ] @injection.language)))\n   body: (raw_body\n     (raw_body_content) @injection.content))\n  (#eq? @_k \"lang\")\n  (#set! injection.include-children))\n\n; Code spans carry no language tag in the current syntax, so we don\'t inject\n; a default. Editors that want guesswork can add a project-local override.\n";
Expand description

The language injection query for this grammar.