asottile-archive / textmate-highlight

syntax highlight engine written for babi
MIT License
1 stars 0 forks source link

including other grammars #8

Closed asottile closed 4 years ago

asottile commented 4 years ago

markdown also has this

    "fenced_code_block_css": {
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|\\{)[^`~]*)?$)",
      "name": "markup.fenced_code.block.markdown",
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
      "beginCaptures": {
        "3": {
          "name": "punctuation.definition.markdown"
        },
        "4": {
          "name": "fenced_code.block.language.markdown"
        },
        "5": {
          "name": "fenced_code.block.language.attributes.markdown"
        }
      },
      "endCaptures": {
        "3": {
          "name": "punctuation.definition.markdown"
        }
      },
      "patterns": [
        {
          "begin": "(^|\\G)(\\s*)(.*)",
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
          "contentName": "meta.embedded.block.css",
          "patterns": [
            {
              "include": "source.css"
            }
          ]
        }
      ]
    },
asottile commented 4 years ago

via e810576aad35da0c8fa452b98dcebf6e4764c0f8