Browse Source

Changed structure of built-in languages

main
Dustin Wilson 3 years ago
parent
commit
d179ad81b9
  1. 3
      composer.json
  2. 57
      composer.lock
  3. 0
      data/applescript/applescript.json
  4. 0
      data/c/c++.json
  5. 0
      data/c/c.json
  6. 0
      data/coffeescript/coffeescript (literate).json
  7. 0
      data/coffeescript/coffeescript.json
  8. 0
      data/css/css.json
  9. 0
      data/graphql/graphql.json
  10. 0
      data/html/html.json
  11. 0
      data/java/java server pages (jsp).json
  12. 0
      data/java/java.json
  13. 0
      data/java/javaproperties.json
  14. 0
      data/java/junit test report.json
  15. 0
      data/java/unified expression language (el).json
  16. 0
      data/javascript/javascript.json
  17. 0
      data/javascript/jsdoc.json
  18. 0
      data/javascript/regular expression replacement (javascript).json
  19. 0
      data/javascript/regular expressions (javascript).json
  20. 0
      data/json/json.json
  21. 0
      data/lua/grammar-lua.json
  22. 136
      data/lua/tree-sitter-lua.json
  23. 216
      data/markdown/fixtures/fenced-code.json
  24. 119
      data/markdown/injections/php.json
  25. 0
      data/markdown/language-markdown.json
  26. 37
      data/markdown/repositories/blocks/fenced-code.json
  27. 259
      data/markdown/repositories/blocks/headings.json
  28. 17
      data/markdown/repositories/blocks/hr.json
  29. 155
      data/markdown/repositories/blocks/lists.json
  30. 24
      data/markdown/repositories/blocks/quotes.json
  31. 120
      data/markdown/repositories/flavors/criticmark.json
  32. 65
      data/markdown/repositories/flavors/front-matter.json
  33. 58
      data/markdown/repositories/flavors/github-blocks.json
  34. 160
      data/markdown/repositories/flavors/github-inlines.json
  35. 45
      data/markdown/repositories/flavors/ia-writer.json
  36. 30
      data/markdown/repositories/flavors/markdown-extra.json
  37. 25
      data/markdown/repositories/flavors/math-block.json
  38. 24
      data/markdown/repositories/flavors/math-inline.json
  39. 23
      data/markdown/repositories/flavors/pandoc.json
  40. 56
      data/markdown/repositories/flavors/rmarkdown-attributes.json
  41. 52
      data/markdown/repositories/flavors/rmarkdown.json
  42. 38
      data/markdown/repositories/flavors/special-attribute-elements.json
  43. 24
      data/markdown/repositories/flavors/special-attributes.json
  44. 17
      data/markdown/repositories/inlines/code.json
  45. 18
      data/markdown/repositories/inlines/comments.json
  46. 129
      data/markdown/repositories/inlines/emphasis.json
  47. 45
      data/markdown/repositories/inlines/entities.json
  48. 9
      data/markdown/repositories/inlines/escapes.json
  49. 12
      data/markdown/repositories/inlines/html.json
  50. 13
      data/markdown/repositories/inlines/line-breaks.json
  51. 29
      data/markdown/repositories/inlines/link-destination.json
  52. 24
      data/markdown/repositories/inlines/link-label.json
  53. 98
      data/markdown/repositories/inlines/link-text.json
  54. 29
      data/markdown/repositories/inlines/link-title.json
  55. 317
      data/markdown/repositories/inlines/links.json
  56. 8
      data/markdown/repositories/inlines/liquid.json
  57. 14
      data/markdown/repositories/inlines/references.json
  58. 9
      data/markdown/repositories/inlines/todo.json
  59. 199
      data/markdown/repositories/markdown.json
  60. 0
      data/php/html.json
  61. 0
      data/php/php.json
  62. 0
      data/python/python-console.json
  63. 0
      data/python/python-traceback.json
  64. 0
      data/python/python.json
  65. 0
      data/python/regular expressions (python).json
  66. 0
      data/ruby/gemfile.json
  67. 0
      data/ruby/html (ruby - erb).json
  68. 0
      data/ruby/ruby.json
  69. 0
      data/shell/shell-session.json
  70. 0
      data/shell/shell-unix-bash.json
  71. 0
      data/smarty/smarty.json
  72. 0
      data/sql/sql.json
  73. 0
      data/textile/textile.json
  74. 0
      data/typescript/TypeScript.json
  75. 0
      data/typescript/TypeScriptReact.json
  76. 0
      data/xml/xml.json
  77. 0
      data/xml/xsl.json
  78. 66
      run

3
composer.json

@ -14,7 +14,8 @@
"php": "^7.4 || ^8.0",
"ext-intl": "*",
"ext-json": "*",
"ext-dom": "*"
"ext-dom": "*",
"docopt/docopt": "^1.0"
},
"autoload": {
"psr-4": {

57
composer.lock

@ -4,8 +4,59 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "cb22d0620bd4dc89e4d39d6eb9acaebe",
"packages": [],
"content-hash": "eb84c086d7c773cf5f8ad5ad2b9e546e",
"packages": [
{
"name": "docopt/docopt",
"version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/docopt/docopt.php.git",
"reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/docopt/docopt.php/zipball/bf3683a16e09fa1665e493eb4d5a29469e132a4f",
"reference": "bf3683a16e09fa1665e493eb4d5a29469e132a4f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.1.*"
},
"type": "library",
"autoload": {
"classmap": [
"src/docopt.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Blake Williams",
"email": "code@shabbyrobe.org",
"homepage": "http://docopt.org/",
"role": "Developer"
}
],
"description": "Port of Python's docopt for PHP >=5.3",
"homepage": "http://github.com/docopt/docopt.php",
"keywords": [
"cli",
"docs"
],
"support": {
"issues": "https://github.com/docopt/docopt.php/issues",
"source": "https://github.com/docopt/docopt.php/tree/1.0.4"
},
"time": "2019-12-03T02:48:46+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
@ -19,5 +70,5 @@
"ext-dom": "*"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.1.0"
}

0
data/source.applescript.json → data/applescript/applescript.json

0
data/source.cpp.json → data/c/c++.json

0
data/source.c.json → data/c/c.json

0
data/source.litcoffee.json → data/coffeescript/coffeescript (literate).json

0
data/source.coffee.json → data/coffeescript/coffeescript.json

0
data/source.css.json → data/css/css.json

0
data/source.graphql.json → data/graphql/graphql.json

0
data/text.html.basic.json → data/html/html.json

0
data/text.html.jsp.json → data/java/java server pages (jsp).json

0
data/source.java.json → data/java/java.json

0
data/source.java-properties.json → data/java/javaproperties.json

0
data/text.junit-test-report.json → data/java/junit test report.json

0
data/source.java.el.json → data/java/unified expression language (el).json

0
data/source.js.json → data/javascript/javascript.json

0
data/source.jsdoc.json → data/javascript/jsdoc.json

0
data/source.js.regexp.replacement.json → data/javascript/regular expression replacement (javascript).json

0
data/source.js.regexp.json → data/javascript/regular expressions (javascript).json

0
data/source.json.json → data/json/json.json

0
data/source.lua.json → data/lua/grammar-lua.json

136
data/lua/tree-sitter-lua.json

@ -0,0 +1,136 @@
{
"name": "Lua",
"scopeName": "source.lua",
"type": "tree-sitter",
"parser": "tree-sitter-lua",
"fileTypes": [ "lua" ],
"folds": [
{
"type": [
"do_statement",
"while_statement",
"repeat_statement",
"for_statement",
"for_in_statement",
"function",
"local_function",
"function_definition",
"table"
],
"end": { "index": -1 }
},
{
"type": ["if_statement","elseif"],
"start": { "index": 1 },
"end": { "type": [ "else", "elseif" ] }
},
{
"type": "if_statement",
"start": { "index": 1 },
"end": { "index": -1 }
},
{
"type": "elseif",
"start": { "index": 1 }
},
{
"type": "else",
"start": { "index": 0 }
}
],
"comments": {
"start": "-- "
},
"scopes": {
"program": "source.lua",
"comment": "comment",
"string": "string",
"number": "constant.numeric",
"function > function_name > identifier": "entity.name.function",
"function > function_name > property_identifier": "entity.name.function",
"function > function_name > method": "entity.name.function",
"function > parameters > identifier": "variable.parameter",
"local_function > identifier": "entity.name.function",
"local_function > parameters > identifier": "variable.parameter",
"function_call > identifier": "entity.name.function",
"function_call > property_identifier": "entity.name.function",
"function_call > method": "entity.name.function",
"function_definition > parameters > identifier": "variable.parameter",
"self": "variable.language",
"next": "entity.name.function",
"spread": "variable.parameter",
"global_variable": "variable.language",
"nil": "constant.language.nil",
"true": "constant.language.boolean",
"false": "constant.language.boolean",
"'local'": "storage.modifier",
"'function'": "storage.type.function",
"label_statement": "storage.type.label",
"'{'": "punctuation.definition.table.begin",
"'}'": "punctuation.definition.table.end",
"'('": "punctuation.definition.parameters.begin",
"')'": "punctuation.definition.parameters.end",
"'do'": "keyword.control",
"'return'": "keyword.control",
"'if'": "keyword.control",
"'then'": "keyword.control",
"'elseif'": "keyword.control",
"'else'": "keyword.control",
"'while'": "keyword.control",
"'repeat'": "keyword.control",
"'until'": "keyword.control",
"'for'": "keyword.control",
"'in'": "keyword.control",
"'goto'": "keyword.control",
"'end'": "keyword.control",
"'or'": "keyword.operator.logical",
"'and'": "keyword.operator.logical",
"'not'": "keyword.operator.logical",
"'|'": "keyword.operator.logical",
"'&'": "keyword.operator.logical",
"'~'": "keyword.operator.logical",
"'='": "keyword.operator.assignment",
"'<'": "keyword.operator.comparison",
"'<='": "keyword.operator.comparison",
"'=='": "keyword.operator.comparison",
"'~='": "keyword.operator.comparison",
"'>='": "keyword.operator.comparison",
"'>'": "keyword.operator.comparison",
"'<<'": "keyword.operator.arithmetic.bitwise",
"'>>'": "keyword.operator.arithmetic.bitwise",
"'+'": "keyword.operator.arithmetic",
"'-'": "keyword.operator.arithmetic",
"'*'": "keyword.operator.arithmetic",
"'/'": "keyword.operator.arithmetic",
"'//'": "keyword.operator.arithmetic",
"'%'": "keyword.operator.arithmetic",
"'..'": "keyword.operator.arithmetic",
"'^'": "keyword.operator.arithmetic",
"'#'": "keyword.operator.arithmetic",
"'.'": "punctuation.separator.object",
"','": "punctuation.separator.object",
"':'": "punctuation.separator.method",
"';'": "punctuation.separator.statement"
}
}

216
data/markdown/fixtures/fenced-code.json

@ -0,0 +1,216 @@
{
"scopeName": "fenced-code.md",
"list": [
{
"pattern": "apib|apiblueprint",
"include": "text.html.markdown.source.gfm.apib",
"contentName": "source.embedded.gfm.apib"
},
{
"pattern": "ass"
},
{
"pattern": "babel",
"include": "source.js.jsx",
"contentName": "source.embedded.js.jsx"
},
{
"pattern": "coffee|coffeescript|coffee-script",
"include": "source.coffee",
"contentName": "source.embedded.coffee"
},
{
"pattern": "c"
},
{
"pattern": "clean"
},
{
"pattern": "clojure"
},
{
"pattern": "cpp|c\\+\\+",
"include": "source.cpp",
"contentName": "source.embedded.cpp"
},
{
"pattern": "cr|crystal",
"include": "source.crystal",
"contentName": "source.embedded.crystal"
},
{
"pattern": "cs|csharp",
"include": "source.cs",
"contentName": "source.embedded.cs"
},
{
"pattern": "css"
},
{
"pattern": "diff|patch|rej",
"include": "source.diff",
"contentName": "source.embedded.diff"
},
{
"pattern": "elixir"
},
{
"pattern": "elm"
},
{
"pattern": "erlang"
},
{
"pattern": "go|golang",
"include": "source.go",
"contentName": "source.embedded.go"
},
{
"pattern": "haskell"
},
{
"pattern": "hcl"
},
{
"pattern": "html",
"include": "text.html.basic",
"contentName": "source.embedded.html"
},
{
"pattern": "idris"
},
{
"pattern": "java"
},
{
"pattern": "javascript|js|jsx",
"include": "source.js",
"contentName": "source.embedded.js"
},
{
"pattern": "json|har",
"include": "source.json",
"contentName": "source.embedded.json"
},
{
"pattern": "julia|julia-repl",
"include": "source.julia",
"contentName": "source.embedded.julia"
},
{
"pattern": "kotlin|kt|kts",
"include": "source.kotlin",
"contentName": "source.embedded.kotlin"
},
{
"pattern": "latex|tex",
"include": "text.tex.latex",
"contentName": "text.embedded.latex"
},
{
"pattern": "less",
"include": "source.css.less",
"contentName": "source.embedded.css.less"
},
{
"pattern": "lua"
},
{
"pattern": "make|makefile",
"include": "source.makefile",
"contentName": "source.embedded.makefile"
},
{
"pattern": "markdown|mdown|md",
"include": "text.md",
"contentName": "text.embedded.md"
},
{
"pattern": "m|mathematica",
"include": "source.mathematica",
"contentName": "source.embedded.mathematica"
},
{
"pattern": "mermaid"
},
{
"pattern": "mson",
"include": "text.html.markdown.source.gfm.mson",
"contentName": "source.embedded.mson"
},
{
"pattern": "objc|objective-c",
"include": "source.objc",
"contentName": "source.embedded.objc"
},
{
"pattern": "php",
"include": "text.html.php",
"contentName": "source.embedded.text.html.php"
},
{
"pattern": "py|python",
"include": "source.python",
"contentName": "source.embedded.python"
},
{
"pattern": "r"
},
{
"pattern": "ruby"
},
{
"pattern": "rust|rs",
"include": "source.rust",
"contentName": "source.embedded.rust"
},
{
"pattern": "sas"
},
{
"pattern": "sass"
},
{
"pattern": "scss",
"include": "source.css.scss",
"contentName": "source.embedded.css.scss"
},
{
"pattern": "sh|bash",
"include": "source.shell",
"contentName": "source.embedded.shell"
},
{
"pattern": "shellsession|console",
"include": "text.shell-session",
"contentName": "text.embedded.shell-session"
},
{
"pattern": "sql"
},
{
"pattern": "stata"
},
{
"pattern": "swift"
},
{
"pattern": "ts|typescript",
"include": "source.ts",
"contentName": "source.embedded.ts"
},
{
"pattern": "xml",
"include": "text.xml",
"contentName": "text.embedded.xml"
},
{
"pattern": "yaml"
},
{
"pattern": "[a-zA-Z0-9-_]+",
"include": "source",
"contentName": "source.embedded"
}
]
}

119
data/markdown/injections/php.json

@ -0,0 +1,119 @@
{
"key": "source.embedded.text.html.php - (meta.embedded | meta.tag), L:source.embedded.text.html.php meta.tag, L:embedded.source.js.embedded.html",
"patterns": [
{
"begin": "(^\\s*)(?=<\\?(?![^?]*\\?>))",
"beginCaptures": {
"0": {
"name": "punctuation.whitespace.embedded.leading.php"
}
},
"end": "(?!\\G)(\\s*$)?",
"endCaptures": {
"0": {
"name": "punctuation.whitespace.embedded.trailing.php"
}
},
"patterns": [
{
"begin": "<\\?(?i:php|=)?",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.php"
}
},
"contentName": "source.php",
"end": "(\\?)>",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.php"
},
"1": {
"name": "source.php"
}
},
"name": "meta.embedded.block.php",
"patterns": [
{
"include": "text.html.php#language"
}
]
}
]
},
{
"begin": "<\\?(?i:php|=)?(?![^?]*\\?>)",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.php"
}
},
"contentName": "source.php",
"end": "(\\G)>",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.php"
},
"1": {
"name": "source.php"
}
},
"name": "meta.embedded.block.php",
"patterns": [
{
"include": "text.html.php#language"
}
]
},
{
"begin": "<\\?(?i:php|=)?",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.php"
}
},
"end": ">",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.php"
}
},
"name": "meta.embedded.line.php",
"patterns": [
{
"captures": {
"1": {
"name": "source.php"
},
"2": {
"name": "punctuation.section.embedded.end.php"
},
"3": {
"name": "source.php"
}
},
"match": "\\G(\\s*)((\\?))(?=>)",
"name": "meta.special.empty-tag.php"
},
{
"begin": "\\G",
"contentName": "source.php",
"end": "(\\?)(?=>)",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.php"
},
"1": {
"name": "source.php"
}
},
"patterns": [
{
"include": "text.html.php#language"
}
]
}
]
}
]
}

0
data/text.md.json → data/markdown/language-markdown.json

37
data/markdown/repositories/blocks/fenced-code.json

@ -0,0 +1,37 @@
{
"key": "fenced-code",
"patterns": [
{
"begin": "^\\s{0,3}([`]{3,})$",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"end": "^\\s{0,3}(\\1)$",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"name": "fenced.code.md",
"contentName": "source.embedded"
},
{
"begin": "^\\s{0,3}([~]{3,})$",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"end": "^\\s{0,3}(\\1)$",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"name": "fenced.code.md",
"contentName": "source.embedded"
}
]
}

259
data/markdown/repositories/blocks/headings.json

@ -0,0 +1,259 @@
{
"key": "headings",
"patterns": [
{
"match": "^(?:[ ]{0,3})((?:#{1,6})\\s*(?:#*)\\s*)$",
"name": "empty.heading.markup.md",
"captures": {
"1": {
"patterns": [
{
"match": "^(#{6})\\s*(#*)\\s*$",
"name": "heading-6.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "^(#{5})\\s*(#*)\\s*$",
"name": "heading-5.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "^(#{4})\\s*(#*)\\s*$",
"name": "heading-4.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "^(#{3})\\s*(#*)\\s*$",
"name": "heading-3.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "^(#{2})\\s*(#*)\\s*$",
"name": "heading-2.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "^(#{1})\\s*(#*)\\s*$",
"name": "heading-1.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
}
]
}
}
},
{
"match": "^((?: {0,3})(?:#{1,6})(?: +)(?:.+))$",
"name": "heading.markup.md",
"captures": {
"1": {
"patterns": [
{
"begin": "^(?: {0,3})(#{1})(?: +)",
"end": "(?: ){1}(#*)(?:\\s*)(?:(\\{[[:ascii:]]*\\}))?$",
"name": "heading-1.md",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
},
"patterns": [
{
"include": "#inlines-in-blocks"
}
]
},
{
"begin": "^(?: {0,3})(#{2})(?: +)",
"end": "(?: ){1}(#*)(?:\\s*)(?:(\\{[[:ascii:]]*\\}))?$",
"name": "heading-2.md",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
},
"patterns": [
{
"include": "#inlines-in-blocks"
}
]
},
{
"begin": "^(?: {0,3})(#{3})(?: +)",
"end": "(?: ){1}(#*)(?:\\s*)(?:(\\{[[:ascii:]]*\\}))?$",
"name": "heading-3.md",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
},
"patterns": [
{
"include": "#inlines-in-blocks"
}
]
},
{
"begin": "^(?: {0,3})(#{4})(?: +)",
"end": "(?: ){1}(#*)(?:\\s*)(?:(\\{[[:ascii:]]*\\}))?$",
"name": "heading-4.md",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
},
"patterns": [
{
"include": "#inlines-in-blocks"
}
]
},
{
"begin": "^(?: {0,3})(#{5})(?: +)",
"end": "(?: ){1}(#*)(?:\\s*)(?:(\\{[[:ascii:]]*\\}))?$",
"name": "heading-5.md",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
},
"patterns": [
{
"include": "#inlines-in-blocks"
}
]
},
{
"begin": "^(?: {0,3})(#{6})(?: +)",
"end": "(?: ){1}(#*)(?:\\s*)(?:(\\{[[:ascii:]]*\\}))?$",
"name": "heading-6.md",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
},
"patterns": [
{
"include": "#inlines-in-blocks"
}
]
}
]
}
}
}
]
}

17
data/markdown/repositories/blocks/hr.json

@ -0,0 +1,17 @@
{
"key": "hr",
"patterns": [
{
"name": "hr.constant.md",
"match": "^[ ]{0,3}[-]{1,} *[-]{1,} *[-]{1,}[ -]*$"
},
{
"name": "hr.constant.md",
"match": "^[ ]{0,3}[*]{1,} *[*]{1,} *[*]{1,}[ *]*$"
},
{
"name": "hr.constant.md",
"match": "^[ ]{0,3}[_]{1,} *[_]{1,} *[_]{1,}[ _]*$"
}
]
}

155
data/markdown/repositories/blocks/lists.json

@ -0,0 +1,155 @@
{
"key": "lists",
"patterns": [
{
"match": "^(?:\\s*)([-+\\*] \\[ \\]\\s?)$",
"name": "empty.task.unordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"match": "^(?:\\s*)([0-9]{1,9}[\\.\\)] \\[ \\]\\s)$",
"name": "empty.task.ordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"match": "^(?:\\s*)([-+\\*]{1}\\s?)$",
"name": "empty.unordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"match": "^(?:\\s*)([0-9]{1,9}[\\.\\)]\\s?)$",
"name": "empty.ordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"match": "^(?:\\s*)([-+\\*] \\[ \\]\\s)(.*)$",
"name": "task.unordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
},
{
"match": "^(?:\\s*)([0-9]{1,9}[\\.\\)] \\[ \\]\\s)(.*)$",
"name": "task.ordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
},
{
"match": "^(?:\\s*)([-+\\*] \\[[xX]\\]\\s)(.*)$",
"name": "completed.task.unordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
},
{
"match": "^(?:\\s*)([0-9]{1,9}[\\.\\)] \\[[xX]\\]\\s)(.*)$",
"name": "completed.task.ordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
},
{
"match": "^(?:\\s*)([-+\\*]{1}\\s)(.*)$",
"name": "unordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
},
{
"match": "^(?:\\s*)([0-9]{1,9}[\\.\\)]\\s)(.*)$",
"name": "ordered.list.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
}
]
}

24
data/markdown/repositories/blocks/quotes.json

@ -0,0 +1,24 @@
{
"key": "quotes",
"patterns": [
{
"match": "^(?: {0,3})(>){1}(?: ){0,1}(.*)$",
"name": "quote.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines-in-blocks"
}
]
}
}
}
]
}

120
data/markdown/repositories/flavors/criticmark.json

@ -0,0 +1,120 @@
{
"key": "criticmark",
"patterns": [
{
"name": "addition.critic.inserted.markup.md",
"begin": "({\\+\\+)",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"end": "(\\+\\+})",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"patterns": [
{
"include": "#emphasis"
}
]
},
{
"name": "deletion.critic.deleted.markup.md",
"begin": "({--)",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"end": "(--})",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"patterns": [
{
"include": "#emphasis"
}
]
},
{
"name": "highlight.critic.changed.markup.md",
"begin": "({==)",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"end": "(==})",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"patterns": [
{
"include": "#emphasis"
}
]
},
{
"name": "comment.critic.markup.md",
"begin": "({>>)",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"patterns": [
{
"match": "(?<=[\\s|>])((@)(\\w[-\\w:]*))(?=[\\s|:|<])",
"captures": {
"1": {
"name": "username.reference.variable.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"include": "#emphasis"
}
],
"end": "(<<})",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"name": "substitution.critic.inserted.markup.md",
"begin": "({~~)",
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"end": "(~~})",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"patterns": [
{
"match": "~>",
"name": "punctuation.md"
},
{
"include": "#emphasis"
}
]
}
]
}

65
data/markdown/repositories/flavors/front-matter.json

@ -0,0 +1,65 @@
{
"key": "front-matter",
"patterns": [
{
"begin": "\\A---$",
"beginCaptures": {
"0": {
"name": "hr.constant.md"
}
},
"end": "^(---|\\.\\.\\.)$",
"endCaptures": {
"1": {
"name": "hr.constant.md"
}
},
"name": "front-matter.yaml.source.md",
"patterns": [
{
"include": "source.yaml"
}
]
},
{
"begin": "\\A\\+\\+\\+$",
"beginCaptures": {
"0": {
"name": "hr.constant.md"
}
},
"end": "^\\+\\+\\+$",
"endCaptures": {
"0": {
"name": "hr.constant.md"
}
},
"name": "front-matter.toml.source.md",
"patterns": [
{
"include": "source.toml"
}
]
},
{
"begin": "\\A;{3}$",
"beginCaptures": {
"0": {
"name": "hr.constant.md"
}
},
"end": "^;{3}$",
"endCaptures": {
"0": {
"name": "hr.constant.md"
}
},
"name": "front-matter.json.source.md",
"patterns": [
{
"include": "source.json"
}
]
}
]
}

58
data/markdown/repositories/flavors/github-blocks.json

@ -0,0 +1,58 @@
{
"key": "github-blocks",
"patterns": [
{
"name": "table.storage.md",
"match": "^(\\|(?= |:|-)[ |:-]*?)(\\|?)$",
"captures": {
"1": {
"patterns": [
{
"match": "(\\|)(?: ?)(:?)(-+)(:?)(?: ?)(?=\\|| |$)",
"captures": {
"1": {
"name": "vertical.punctuation.md"
},
"2": {
"name": "alignment.punctuation.md"
},
"3": {
"name": "horizontal.punctuation.md"
},
"4": {
"name": "alignment.punctuation.md"
}
}
}
]
},
"2": {
"name": "vertical.punctuation.md"
}
}
},
{
"name": "table.storage.md",
"match": "^(\\|)(?= )(.+)$",
"captures": {
"1": {
"name": "vertical.punctuation.md"
},
"2": {
"patterns": [
{
"match": "(?<= )\\|(?=$| )",
"name": "vertical.punctuation.md"
},
{
"include": "#inlines-in-blocks"
}
]
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

160
data/markdown/repositories/flavors/github-inlines.json

File diff suppressed because one or more lines are too long

45
data/markdown/repositories/flavors/ia-writer.json

@ -0,0 +1,45 @@
{
"key": "ia-writer",
"patterns": [
{
"match": "(?x) ^\\s{0,3}( (/)([^'\"()]*?) (\\.[a-z0-9]+) (\\s*?) ((\"|')[^'\"]*?(\\7))? )$",
"captures": {
"1": {
"name": "block.content.link.markup.md"
},
"2": {
"name": "punctuation.md"
},
"6": {
"name": "title.string.markup.md"
},
"7": {
"name": "punctuation.md"
},
"8": {
"name": "punctuation.md"
}
}
},
{
"match": "(?x) ^\\s{0,3}( (/)([^'\"()]*?) (\\.[a-z0-9]+) (\\s*?) ((\\()[^()]*?(\\)))? )$",
"captures": {
"1": {
"name": "block.content.link.markup.md"
},
"2": {
"name": "punctuation.md"
},
"6": {
"name": "title.string.markup.md"
},
"7": {
"name": "punctuation.md"
},
"8": {
"name": "punctuation.md"
}
}
}
]
}

30
data/markdown/repositories/flavors/markdown-extra.json

@ -0,0 +1,30 @@
{
"key": "markdown-extra",
"patterns": [
{
"name": "definition.list.markup.md",
"match": "^(?:\\s*)(:)( +)(.*)$",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"name": "abbreviation.reference.link.markup.md",
"match": "^((?:\\*\\[)(?:[^\\]]+)(?:\\]))(:) (.*)$",
"captures": {
"1": {
"patterns": [
{
"include": "#link-label"
}
]
},
"2": {
"name": "punctuation.md"
}
}
}
]
}

25
data/markdown/repositories/flavors/math-block.json

@ -0,0 +1,25 @@
{
"key": "math-block",
"patterns": [
{
"name": "block.math.markup.md",
"begin": "(\\${2})",
"end": "(\\${2})(?:.*)",
"patterns": [
{
"include": "text.tex.latex"
}
],
"beginCaptures": {
"1": {
"name": "punctuation.md"
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
}
}
}
]
}

24
data/markdown/repositories/flavors/math-inline.json

@ -0,0 +1,24 @@
{
"key": "math-inline",
"patterns": [
{
"name": "inline.math.markup.md",
"match": "(\\$)(?! )(.+?)(?<! )(\\$)(?!\\d)",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "text.tex.latex"
}
]
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

23
data/markdown/repositories/flavors/pandoc.json

@ -0,0 +1,23 @@
{
"key": "pandoc",
"patterns": [
{
"name": "table.storage.md",
"match": "^(\\+-+)+\\+$",
"captures": {
"0": {
"name": "punctuation.md"
}
}
},
{
"name": "table.storage.md",
"match": "^(\\+=+)+\\+$",
"captures": {
"0": {
"name": "punctuation.md"
}
}
}
]
}

56
data/markdown/repositories/flavors/rmarkdown-attributes.json

@ -0,0 +1,56 @@
{
"key": "rmarkdown-attributes",
"patterns": [
{
"match": "(?x) (?#<=^|,|,\\s) ([A-Za-z0-9\\.]+) (?:\\s?) (=) (?:\\s?) (TRUE|FALSE)",
"name": "rmarkdown.attribute.meta.md",
"captures": {
"1": {
"name": "key.keyword.md"
},
"2": {
"name": "punctuation.md"
},
"3": {
"name": "value.constant.md"
}
}
},
{
"match": "(?x) (?#<=^|,|,\\s) ([A-Za-z0-9\\.]+) (?:\\s?) (=) (?:\\s?) ([A-Za-z0-9]+)",
"name": "rmarkdown.attribute.meta.md",
"captures": {
"1": {
"name": "key.keyword.md"
},
"2": {
"name": "punctuation.md"
},
"3": {
"name": "value.constant.md"
}
}
},
{
"match": "(?x) (?#<=^|,|,\\s) ([A-Za-z0-9\\.]+) (?:\\s?) (=) (?:\\s?) ( ('|\") ([^\\4]*?) (\\4) )",
"name": "rmarkdown.attribute.meta.md",
"captures": {
"1": {
"name": "key.keyword.md"
},
"2": {
"name": "punctuation.md"
},
"3": {
"name": "value.string.md"
},
"4": {
"name": "punctuation.md"
},
"6": {
"name": "punctuation.md"
}
}
}
]
}

52
data/markdown/repositories/flavors/rmarkdown.json

@ -0,0 +1,52 @@
{
"key": "rmarkdown",
"patterns": [
{
"begin": "(?x) (```)( \\{r\\s? (.*?) \\}$ )",
"end": "^(\\1)$",
"name": "fenced.code.md",
"contentName": "source.embedded.r",
"patterns": [
{
"include": "source.r"
}
],
"beginCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"begin": "(\\{)(r)(\\s?)",
"beginCaptures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "language.constant.md"
}
},
"end": "(\\})$",
"endCaptures": {
"1": {
"name": "punctuation.md"
}
},
"patterns": [
{
"include": "#rmarkdown-attributes"
}
]
}
]
}
},
"endCaptures": {
"1": {
"name": "punctuation.md"
}
}
}
]
}

38
data/markdown/repositories/flavors/special-attribute-elements.json

@ -0,0 +1,38 @@
{
"key": "special-attribute-elements",
"patterns": [
{
"name": "id.special.attribute.meta.md",
"match": "(?<=^|\\s)(#)([^\\s|\\}]*)",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"name": "class.special.attribute.meta.md",
"match": "(\\.)([^\\s|\\}]*)",
"captures": {
"1": {
"name": "punctuation.md"
}
}
},
{
"match": "([^ ]+)(=)([^\\s|\\}]*)",
"name": "other.special.attribute.meta.md",
"captures": {
"1": {
"name": "key.keyword.md"
},
"2": {
"name": "punctuation.md"
},
"3": {
"name": "value.string.md"
}
}
}
]
}

24
data/markdown/repositories/flavors/special-attributes.json

@ -0,0 +1,24 @@
{
"key": "special-attributes",
"patterns": [
{
"name": "special-attributes.raw.markup.md",
"match": "^(\\{)([^\\}]*)(\\})$",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#special-attribute-elements"
}
]
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

17
data/markdown/repositories/inlines/code.json

@ -0,0 +1,17 @@
{
"key": "code",
"patterns": [
{
"match": "(?<!`)(`+)(?!`).+?(?<!`)(\\1)(?!`)",
"name": "code.raw.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
}
]
}

18
data/markdown/repositories/inlines/comments.json

@ -0,0 +1,18 @@
{
"key": "comments",
"patterns": [
{
"name": "comment.md",
"begin": "(<!(?:-{2,}))",
"end": "((?:-{2,})>)",
"captures": {
"1": {
"name": "punctuation.md"
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

129
data/markdown/repositories/inlines/emphasis.json

@ -0,0 +1,129 @@
{
"key": "emphasis",
"patterns": [
{
"match": "(?<![\\w|\\\\])([_]{2})(?!\\s)(?m:(.+?))(?<![\\s|\\\\])(\\1)(?!\\w)",
"name": "strong.emphasis.bold.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#inlines-in-inlines"
}
]
},
"3": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<![\\w|\\\\])([\\*]{2})(?!\\s)(?m:(.+?))(?<![\\s|\\\\])(\\1)(?!\\w)",
"name": "strong.emphasis.bold.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#inlines-in-inlines"
}
]
},
"3": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<=\\w)([\\*]{2})(?:.+?)(?<!\\W)(\\1)",
"name": "strong.emphasis.bold.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<=\\s|^)([\\*]{2})(?=\\w)(?:.+?)(\\1)(?=\\w)",
"name": "strong.emphasis.bold.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<![\\w|_|\\\\])([_])(?!\\s|\\1)(?m:(.+?))(?<![\\s|\\\\])(\\1)(?!\\w)",
"name": "emphasis.italic.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#inlines-in-inlines"
}
]
},
"3": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<![\\w|\\*|\\\\])([\\*])(?!\\s|\\1)(?m:(.+?))(?<![\\s|\\\\])(\\1)(?!\\w)",
"name": "emphasis.italic.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#inlines-in-inlines"
}
]
},
"3": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<=\\w)([\\*])(?:.+?)(?<!\\W)(\\1)",
"name": "emphasis.italic.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
},
{
"match": "(?<=\\s|^)([\\*])(?=\\w)(?:.+?)(\\1)(?=\\w)",
"name": "emphasis.italic.markup.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "punctuation.md"
}
}
}
]
}

45
data/markdown/repositories/inlines/entities.json

@ -0,0 +1,45 @@
{
"key": "entities",
"patterns": [
{
"match": "(?<=^|\\s)(&)(?=$|\\s|,|!|\\?|\\.)",
"name": "ampersand.md"
},
{
"match": "(&)([a-zA-Z0-9]{2,32})(;)",
"name": "entity.constant.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"3": {
"name": "punctuation.md"
}
}
},
{
"match": "(&#)([0-9]{1,8})(;)",
"name": "entity.constant.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"3": {
"name": "punctuation.md"
}
}
},
{
"match": "(&#[x|X])([0-9a-fA-F]{1,8})(;)",
"name": "entity.constant.md",
"captures": {
"1": {
"name": "punctuation.md"
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

9
data/markdown/repositories/inlines/escapes.json

@ -0,0 +1,9 @@
{
"key": "escapes",
"patterns": [
{
"match": "\\\\.",
"name": "escape.constant.md"
}
]
}

12
data/markdown/repositories/inlines/html.json

@ -0,0 +1,12 @@
{
"key": "html",
"patterns": [
{
"match": "<(?![a-zA-Z!/])",
"name": ""
},
{
"include": "text.html.basic"
}
]
}

13
data/markdown/repositories/inlines/line-breaks.json

@ -0,0 +1,13 @@
{
"key": "line-breaks",
"patterns": [
{
"match": "( )$",
"name": "line-break.constant.md"
},
{
"match": "(\\\\)$",
"name": "line-break.constant.md"
}
]
}

29
data/markdown/repositories/inlines/link-destination.json

@ -0,0 +1,29 @@
{
"key": "link-destination",
"patterns": [
{
"name": "destination.link.md",
"match": "^(<)(.*)(>)$",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "markup.underline.link"
},
"3": {
"name": "punctuation.md"
}
}
},
{
"name": "destination.link.md",
"match": "(.+)",
"captures": {
"1": {
"name": "markup.underline.link"
}
}
}
]
}

24
data/markdown/repositories/inlines/link-label.json

@ -0,0 +1,24 @@
{
"key": "link-label",
"patterns": [
{
"name": "label.link.string.md",
"match": "^(\\*?\\[\\^?)(.*)(\\])$",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#references"
}
]
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

98
data/markdown/repositories/inlines/link-text.json

@ -0,0 +1,98 @@
{
"key": "link-text",
"patterns": [
{
"name": "text.link.string.md",
"match": "(?x) ^(\\[) ( ( (?:!\\[) (?:[^\\[\\]]*) (?:\\]) ) (\\() ([^ [:cntrl:]]+)? (?: (?:\\s+) ( (?:[\"'\\(]) .*? (?:[\"'\\)]) ) (?:\\s*) )? (\\)) (\\{[[:ascii:]]*\\})? ) (\\])",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "link.markup.md"
},
"3": {
"patterns": [
{
"include": "#link-text"
}
]
},
"4": {
"name": "punctuation.md"
},
"5": {
"patterns": [
{
"include": "#link-destination"
}
]
},
"6": {
"patterns": [
{
"include": "#link-title"
}
]
},
"7": {
"name": "punctuation.md"
},
"8": {
"patterns": [
{
"include": "#special-attributes"
}
]
},
"9": {
"name": "punctuation.md"
}
}
},
{
"name": "image.link.string.md",
"match": "^(!\\[)(.*)(\\])$",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#emphasis"
},
{
"include": "#code"
}
]
},
"3": {
"name": "punctuation.md"
}
}
},
{
"name": "text.link.string.md",
"match": "^(\\[)(.*)(\\])$",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"patterns": [
{
"include": "#emphasis"
},
{
"include": "#code"
}
]
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

29
data/markdown/repositories/inlines/link-title.json

@ -0,0 +1,29 @@
{
"key": "link-title",
"patterns": [
{
"name": "title.link.md",
"match": "^(['|\"])(.*)(\\1)$",
"captures": {
"1": {
"name": "punctuation.md"
},
"3": {
"name": "punctuation.md"
}
}
},
{
"name": "title.link.md",
"match": "^(\\()(.*)(\\))$",
"captures": {
"1": {
"name": "punctuation.md"
},
"3": {
"name": "punctuation.md"
}
}
}
]
}

317
data/markdown/repositories/inlines/links.json

@ -0,0 +1,317 @@
{
"key": "links",
"patterns": [
{
"name": "reference.footnote.link.markup.md",
"match": "((?:\\[\\^)(?:[^\\[\\]]+)(?:\\]))(?!:)",
"captures": {
"1": {
"patterns": [
{
"include": "#link-label"
}
]
}
}
},
{
"name": "definition.footnote.link.markup.md",
"match": "((?:\\[\\^)(?:[^\\[\\]]+)(?:\\]))(:)",
"captures": {
"1": {
"patterns": [
{
"include": "#link-label"
}
]
},
"2": {
"name": "punctuation.md"
}
}
},
{
"name": "link.markup.md",
"match": "(?x) ( (?:\\[) (?: (?: (?:!\\[) (?:[^\\[\\]]*) (?:\\]) ) (?:\\() (?:[^ [:cntrl:]]+)? (?: (?:\\s+) (?: (?:[\"'\\(]) .*? (?:[\"'\\)]) ) (?:\\s*) )? (?:\\)) (?:\\{[[:ascii:]]*\\})? ) (?:\\]) ) (\\() ([^ [:cntrl:]]+)? (?: (?:\\s+) ( (?:[\"'\\(]) .*? (?:[\"'\\)]) ) (?:\\s*) )? (\\)) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-text"
}
]
},
"2": {
"name": "punctuation.md"
},
"3": {
"patterns": [
{
"include": "#link-destination"
}
]
},
"4": {
"patterns": [
{
"include": "#link-title"
}
]
},
"5": {
"name": "punctuation.md"
},
"6": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "link.markup.md",
"match": "(?x) ( (?:!?\\[) (?:[^\\[\\]]*) (?:\\]) ) (\\() ([^ [:cntrl:]()]+)? (?: (?:\\s+) ( (?:[\"'\\(]) .*? (?:[\"'\\)]) ) (?:\\s*) )? (\\)) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-text"
}
]
},
"2": {
"name": "punctuation.md"
},
"3": {
"patterns": [
{
"include": "#link-destination"
}
]
},
"4": {
"patterns": [
{
"include": "#link-title"
}
]
},
"5": {
"name": "punctuation.md"
},
"6": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "link.markup.md",
"match": "(?x) ( (?:!?\\[) (?:[^\\[\\]]*) (?:\\]) ) (\\() (<[^[:cntrl:]]*>) (?: (?:\\s+) ( (?:[\"'\\(]) .*? (?:[\"'\\)]) ) (?:\\s*) )? (\\)) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-text"
}
]
},
"2": {
"name": "punctuation.md"
},
"3": {
"patterns": [
{
"include": "#link-destination"
}
]
},
"4": {
"patterns": [
{
"include": "#link-title"
}
]
},
"5": {
"name": "punctuation.md"
},
"6": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "link.markup.md",
"match": "(?x) ( (?:\\[) (?: (?: (?:!\\[) (?:[^\\[\\]]*) (?:\\]) ) (?:\\() (?:[^ [:cntrl:]]+)? (?: (?:\\s+) (?: (?:[\"'\\(]) .*? (?:[\"'\\)]) ) (?:\\s*) )? (?:\\)) (?:\\{[[:ascii:]]*\\})? ) (?:\\]) ) ( (?:\\[) (?:[^\\[\\]]*) (?:\\]) ) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-text"
}
]
},
"2": {
"patterns": [
{
"include": "#link-label"
}
]
},
"3": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "link.markup.md",
"match": "(?x) ( (?:!?\\[) (?:[^\\[\\]]*) (?:\\]) ) ( (?:\\[) (?:[^\\[\\]]*) (?:\\]) ) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-text"
}
]
},
"2": {
"patterns": [
{
"include": "#link-label"
}
]
},
"3": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "link.markup.md",
"match": "(?x) ( (?:!\\[) (?:[^\\[\\]]*) (?:\\]) ) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-text"
}
]
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "reference.link.markup.md",
"match": "(?x) ((?:\\[)(?:[^\\[\\]]*)(?:\\])) (:) (?:\\s) ([^ [:cntrl:]]+) (?:(?:\\s)((?:\")(?:.*?)(?:\")))? (?:(?:\\s)(\\{[[:ascii:]]*\\}))?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-label"
}
]
},
"2": {
"name": "punctuation.md"
},
"3": {
"patterns": [
{
"include": "#link-destination"
}
]
},
"4": {
"patterns": [
{
"include": "#link-title"
}
]
},
"5": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"match": "(?x) ( (?:\\[) (?:[^\\[\\]]*) (?:\\]) ) (?!:) (\\{[^}]*\\})?",
"captures": {
"1": {
"patterns": [
{
"include": "#link-label"
}
]
},
"2": {
"patterns": [
{
"include": "#special-attributes"
}
]
}
}
},
{
"name": "auto.link.markup.md",
"match": "(?i:(<)((coap|doi|javascript|aaa|aaas|about|acap|cap|cid|crid|data|dav|dict|dns|file|ftp|geo|go|gopher|h323|http|https|iax|icap|im|imap|info|ipp|iris|iris.beep|iris.xpc|iris.xpcs|iris.lwz|ldap|mailto|mid|msrp|msrps|mtqp|mupdate|news|nfs|ni|nih|nntp|opaquelocktoken|pop|pres|rtsp|service|session|shttp|sieve|sip|sips|sms|snmp|soap.beep|soap.beeps|tag|tel|telnet|tftp|thismessage|tn3270|tip|tv|urn|vemmi|ws|wss|xcon|xcon-userid|xmlrpc.beep|xmlrpc.beeps|xmpp|z39.50r|z39.50s|adiumxtra|afp|afs|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|chrome|chrome-extension|com-eventbrite-attendee|content|cvs|dlna-playsingle|dlna-playcontainer|dtn|dvb|ed2k|facetime|feed|finger|fish|gg|git|gizmoproject|gtalk|hcp|icon|ipn|irc|irc6|ircs|itms|jar|jms|keyparc|lastfm|ldaps|magnet|maps|market|message|mms|ms-help|msnim|mumble|mvn|notes|oid|palm|paparazzi|platform|proxy|psyc|query|res|resource|rmi|rsync|rtmp|secondlife|sftp|sgn|skype|smb|soldat|spotify|ssh|steam|svn|teamspeak|things|udp|unreal|ut2004|ventrilo|view-source|webcal|wtai|wyciwyg|xfire|xri|ymsgr):(?:[^ [:cntrl:]<>]+))(>))",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "markup.underline.link"
},
"4": {
"name": "punctuation.md"
}
}
},
{
"name": "email.auto.link.markup.md",
"match": "(<)(([a-zA-Z0-9\\.!#$%&'\\*\\+/=?^_`{\\|}~-]+)(@)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*))(>)",
"captures": {
"1": {
"name": "punctuation.md"
},
"2": {
"name": "markup.underline.link"
},
"4": {
"name": "punctuation.md"
},
"6": {
"name": "punctuation.md"
}
}
}
]
}

8
data/markdown/repositories/inlines/liquid.json

@ -0,0 +1,8 @@
{
"key": "liquid",
"patterns": [
{
"include": "text.html.liquid"
}
]
}

14
data/markdown/repositories/inlines/references.json

@ -0,0 +1,14 @@
{
"key": "references",
"patterns": [
{
"match": "(?x) (?<=^|\\s|\"|'|\\(|\\[) ( (-?@) ( [a-zA-Z0-9_] [a-zA-Z0-9_:.#$%&+?<>~/-]* (?<![:|.|+|?|<|>|/|-]) ) )",
"captures": {
"2": {
"name": "punctuation.md"
}
},
"name": "reference.variable.md"
}
]
}

9
data/markdown/repositories/inlines/todo.json

@ -0,0 +1,9 @@
{
"key": "todo",
"patterns": [
{
"match": "(?<!\\w)@?(TODO|FIXME|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP)\\b",
"name": "storage.type.class.${1:/downcase}.md"
}
]
}

199
data/markdown/repositories/markdown.json

@ -0,0 +1,199 @@
{
"name": "Markdown",
"scopeName": "text.md",
"limitLineLength": false,
"fileTypes": [
"markdown",
"md",
"mdown",
"mkd",
"mkdown",
"rmd",
"ron",
"emdee",
"spec"
],
"patterns": [
{
"include": "#blocks"
},
{
"include": "#inlines"
},
{
"include": "#flavors"
}
],
"repository": {
"blocks": {
"patterns": [
{
"include": "#comments"
},
{
"include": "#front-matter"
},
{
"include": "#hr"
},
{
"include": "#headings"
},
{
"include": "#lists"
},
{
"include": "#quotes"
},
{
"include": "#rmarkdown"
},
{
"include": "#fenced-code-blocks"
},
{
"include": "#fenced-code"
},
{
"include": "#github-blocks"
},
{
"include": "#math-block"
}
]
},
"inlines": {
"patterns": [
{
"include": "#escapes"
},
{
"include": "#code"
},
{
"include": "#entities"
},
{
"include": "#links"
},
{
"include": "#html"
},
{
"include": "#liquid"
},
{
"include": "#emphasis"
},
{
"include": "#line-breaks"
},
{
"include": "#todo"
},
{
"include": "#references"
},
{
"include": "#github-inlines"
},
{
"include": "#math-inline"
}
]
},
"flavors": {
"patterns": [
{
"include": "#criticmark"
},
{
"include": "#github-inlines"
},
{
"include": "#markdown-extra"
},
{
"include": "#pandoc"
},
{
"include": "#ia-writer"
}
]
},
"inlines-in-blocks": {
"patterns": [
{
"include": "#escapes"
},
{
"include": "#code"
},
{
"include": "#entities"
},
{
"include": "#links"
},
{
"include": "#html"
},
{
"include": "#liquid"
},
{
"include": "#emphasis"
},
{
"include": "#todo"
},
{
"include": "#references"
},
{
"include": "#flavors"
},
{
"include": "#math-inline"
}
]
},
"inlines-in-inlines": {
"patterns": [
{
"include": "#escapes"
},
{
"include": "#code"
},
{
"include": "#entities"
},
{
"include": "#links"
},
{
"include": "#html"
},
{
"include": "#liquid"
},
{
"include": "#emphasis"
},
{
"include": "#todo"
},
{
"include": "#references"
},
{
"include": "#github-inlines"
},
{
"include": "#criticmark"
}
]
}
}
}

0
data/text.html.php.json → data/php/html.json

0
data/source.php.json → data/php/php.json

0
data/text.python.console.json → data/python/python-console.json

0
data/text.python.traceback.json → data/python/python-traceback.json

0
data/source.python.json → data/python/python.json

0
data/source.regexp.python.json → data/python/regular expressions (python).json

0
data/source.ruby.gemfile.json → data/ruby/gemfile.json

0
data/text.html.erb.json → data/ruby/html (ruby - erb).json

0
data/source.ruby.json → data/ruby/ruby.json

0
data/text.shell-session.json → data/shell/shell-session.json

0
data/source.shell.json → data/shell/shell-unix-bash.json

0
data/text.html.smarty.json → data/smarty/smarty.json

0
data/source.sql.json → data/sql/sql.json

0
data/text.html.textile.json → data/textile/textile.json

0
data/source.ts.json → data/typescript/TypeScript.json

0
data/source.tsx.json → data/typescript/TypeScriptReact.json

0
data/text.xml.json → data/xml/xml.json

0
data/text.xml.xsl.json → data/xml/xsl.json

66
run

@ -69,7 +69,7 @@ fail() {
}
# Check for bash 4+
shopt -s globstar extglob || fail
shopt -s globstar extglob || help
awkcmd="awk"
if [ "$(uname)" == "Darwin" ]; then
@ -77,7 +77,30 @@ if [ "$(uname)" == "Darwin" ]; then
fi
# Check for presence of dependencies
if (( $(which $awkcmd composer parallel yarn | wc -l) < 4 )); then fail; fi
if (( $(which $awkcmd composer parallel yarn | wc -l) < 4 )); then help; fi
read -r -d '' grammarList <<'EOF'
franzheidl/atom-applescript applescript
atom/language-c c
atom/language-coffee-script coffeescript
atom/language-css css
rmosolgo/language-graphql graphql
atom/language-html html
atom/language-java java
atom/language-javascript javascript
atom/language-json json
burodepeper/language-markdown markdown
Azganoth/language-lua-plus lua
atom/language-php php
atom/language-python python
atom/language-ruby ruby
atom/language-shellscript shell
MaxGiting/atom-language-smarty smarty
atom/language-sql sql
al3x/atom-language-textile textile
atom/language-typescript typescript
atom/language-xml xml
EOF
case $1 in
init)
@ -86,46 +109,27 @@ init)
rm -rf "$cwd"/deps/*
cd "$cwd"/deps
printf "franzheidl/atom-applescript
atom/language-c
atom/language-coffee-script
atom/language-css
rmosolgo/language-graphql
atom/language-html
atom/language-java
atom/language-javascript
atom/language-json
burodepeper/language-markdown
Azganoth/language-lua-plus
atom/language-php
atom/language-python
atom/language-ruby
atom/language-shellscript
MaxGiting/atom-language-smarty
atom/language-sql
al3x/atom-language-textile
atom/language-typescript
atom/language-xml" | parallel "git clone https://github.com/{}.git"
printf "$grammarList" | parallel --colsep ' ' "git clone https://github.com/{1}.git"
cd "$cwd"
;;
needed)
grep -Fxv -f <(cd "$cwd"/data && ls -1 *.json | sed -e 's/\.json$//g') <(cat "$cwd"/data/*.json | grep -E "\"include\"\s*:\s*\"[^#\$]+\"" | gawk '{ match($0, /"include": "(.+?)"/, arr); if(arr[1] != "") print arr[1] }' | sort -u)
grep -Fxv -f <(cd "$cwd"/data && ls -1 *.json | sed -e 's/\.json$//g') <(cat "$cwd"/data/*.json | grep -E "\"include\"\s*:\s*\"[^#\$]+\"" | $awkcmd '{ match($0, /"include": "(.+?)"/, arr); if(arr[1] != "") print arr[1] }' | sort -u)
;;
build | *)
rm -rf "$cwd"/data/*
# Convert from CSON to JSON AND rename the files to their scopes... all in parallel.
ls -1 "$cwd"/deps/**/grammars/!(tree-sitter-*).cson | parallel "temp=\$(mktemp) &&
csonc --output=\$temp {}
mv \$temp \"$cwd\"/data/\$(grep -m1 scopeName \$temp |
$awkcmd '{ match(\$0, /\s*:\s*\"(.+?)\"/, arr); if(arr[1] != \"\") print arr[1] }').json"
temp=$(mktemp -d)
printf "$grammarList" | parallel --colsep ' ' "mkdir -p $temp/{2} &&
cp -r \"$cwd\"/deps/\$(basename {1})/grammars/* $temp/{2}/"
ls -1 $temp/**/!(tree-sitter-*).cson | parallel "csonc --output={.}.json {} && rm {}"
rm -rf $temp/**/*.cson
# Some packages use JSON files, so just rename them to their scopes
ls -1 "$cwd"/deps/**/grammars/!(tree-sitter-*).json | parallel "cp {} \"$cwd\"/data/\$(grep -m1 scopeName {} |
$awkcmd '{ match(\$0, /\s*:\s*\"(.+?)\"/, arr); if(arr[1] != \"\") print arr[1] }').json"
mv $temp/* "$cwd"/data/
;;
esac
Loading…
Cancel
Save