fix: small fix to heredoc endCaptures.

This commit is contained in:
James Harton 2023-02-20 12:14:40 +13:00
parent 21a0d9222d
commit a46f86088e
2 changed files with 417 additions and 378 deletions

View file

@ -1,348 +1,385 @@
{ {
"scopeName": "source.elixir.cinder", "scopeName": "source.elixir.cinder",
"injectionSelector": "L:source.elixir", "injectionSelector": "L:source.elixir",
"name": "elixir-cinder", "name": "elixir-cinder",
"patterns": [{ "patterns": [
"comment": "Handlebars markdown fragment", {
"name": "text.html.handlebars", "comment": "Handlebars markdown fragment",
"begin": "\\s?(```(handlebars|hbs))$", "name": "text.html.handlebars",
"beginCaptures": { "begin": "\\s?(```(handlebars|hbs))$",
"0": { "beginCaptures": {
"name": "comment.documentation.heredoc.elixir" "0": {
} "name": "comment.documentation.heredoc.elixir"
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with heredoc (double quotes)",
"name": "text.html.handlebars",
"begin": "\\s?(~B\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with double quotes",
"name": "text.html.handlebars",
"begin": "~B\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with square brackets",
"name": "text.html.handlebars",
"begin": "~B\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with parentheses",
"name": "text.html.handlebars",
"begin": "~B\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with curly braces",
"name": "text.html.handlebars",
"begin": "~B\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "JavaScript markdown fragment",
"name": "source.js",
"begin": "\\s?(```(js|javascript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with heredoc (double quotes)",
"name": "source.js",
"begin": "\\s?(~j\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with double quotes",
"name": "source.js",
"begin": "~j\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with square brackets",
"name": "source.js",
"begin": "~j\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with parentheses",
"name": "source.js",
"begin": "~j\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with curly brackets",
"name": "source.js",
"begin": "~j\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "TypeScript markdown fragment",
"name": "text.html.handlebars",
"begin": "\\s?(```(ts|typescript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with heredoc (double quotes)",
"name": "source.ts",
"begin": "\\s?(~t\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with double quotes",
"name": "source.ts",
"begin": "~t\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with square brackets",
"name": "source.ts",
"begin": "~t\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with parentheses",
"name": "source.ts",
"begin": "~t\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with curly brackets",
"name": "source.ts",
"begin": "~t\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
} }
] },
} "end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with heredoc (double quotes)",
"name": "text.html.handlebars",
"begin": "\\s?(~B\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with double quotes",
"name": "text.html.handlebars",
"begin": "~B\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with square brackets",
"name": "text.html.handlebars",
"begin": "~B\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with parentheses",
"name": "text.html.handlebars",
"begin": "~B\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with curly braces",
"name": "text.html.handlebars",
"begin": "~B\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "JavaScript markdown fragment",
"name": "source.js",
"begin": "\\s?(```(js|javascript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with heredoc (double quotes)",
"name": "source.js",
"begin": "\\s?(~j\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with double quotes",
"name": "source.js",
"begin": "~j\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with square brackets",
"name": "source.js",
"begin": "~j\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with parentheses",
"name": "source.js",
"begin": "~j\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with curly brackets",
"name": "source.js",
"begin": "~j\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "TypeScript markdown fragment",
"name": "text.html.handlebars",
"begin": "\\s?(```(ts|typescript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with heredoc (double quotes)",
"name": "source.ts",
"begin": "\\s?(~t\"\"\")",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with double quotes",
"name": "source.ts",
"begin": "~t\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with square brackets",
"name": "source.ts",
"begin": "~t\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with parentheses",
"name": "source.ts",
"begin": "~t\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with curly brackets",
"name": "source.ts",
"begin": "~t\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
}
]
}

View file

@ -1,33 +1,35 @@
{ {
"name": "cinder", "name": "cinder",
"displayName": "Cinder: A framework for web applications in Elixir", "displayName": "Cinder: A framework for web applications in Elixir",
"description": "Syntax highlighting support for Cinder/Elixir", "description": "Syntax highlighting support for Cinder/Elixir",
"version": "0.1.0", "version": "0.1.1",
"author": "James Harton", "author": "James Harton",
"publisher": "jimsy", "publisher": "jimsy",
"license": "HL3-FULL", "license": "HL3-FULL",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitlab.com/jimsy/vscode-cinder.git" "url": "https://gitlab.com/jimsy/vscode-cinder.git"
}, },
"engines": { "engines": {
"vscode": "^1.25.1" "vscode": "^1.25.1"
}, },
"categories": [ "categories": [
"Programming Languages" "Programming Languages"
], ],
"contributes": { "contributes": {
"grammars": [{ "grammars": [
"path": "elixir-cinder.json", {
"scopeName": "source.elixir.cinder", "path": "elixir-cinder.json",
"injectTo": [ "scopeName": "source.elixir.cinder",
"source.elixir" "injectTo": [
], "source.elixir"
"embeddedLanguages": { ],
"meta.embedded.inline.handlebars": "handlebars", "embeddedLanguages": {
"meta.embedded.inline.js": "js", "meta.embedded.inline.handlebars": "handlebars",
"meta.embedded.inline.ts": "ts" "meta.embedded.inline.js": "js",
} "meta.embedded.inline.ts": "ts"
}] }
} }
} ]
}
}