package tm-grammars

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file tm_grammar_markdown_nix.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
let lang_id = "markdown-nix"
let json = {json|{
  "fileTypes": [
  ],
  "injectTo": [
    "text.html.markdown"
  ],
  "injectionSelector": "L:text.html.markdown",
  "name": "markdown-nix",
  "patterns": [
    {
      "include": "#nix-code-block"
    }
  ],
  "repository": {
    "nix-code-block": {
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(nix)(\\s+[^`~]*)?$)",
      "beginCaptures": {
        "3": {
          "name": "punctuation.definition.markdown"
        },
        "5": {
          "name": "fenced_code.block.language"
        },
        "6": {
          "name": "fenced_code.block.language.attributes"
        }
      },
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
      "endCaptures": {
        "3": {
          "name": "punctuation.definition.markdown"
        }
      },
      "name": "markup.fenced_code.block.markdown",
      "patterns": [
        {
          "begin": "(^|\\G)(\\s*)(.*)",
          "contentName": "meta.embedded.block.nix",
          "patterns": [
            {
              "include": "source.nix"
            }
          ],
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
        }
      ]
    }
  },
  "scopeName": "markdown.nix.codeblock"
}|json}