From a46f86088e56d7caceb8ebdcc1677535eb486201 Mon Sep 17 00:00:00 2001 From: James Harton Date: Mon, 20 Feb 2023 12:14:40 +1300 Subject: [PATCH] fix: small fix to heredoc endCaptures. --- elixir-cinder.json | 729 ++++++++++++++++++++++++--------------------- package.json | 66 ++-- 2 files changed, 417 insertions(+), 378 deletions(-) diff --git a/elixir-cinder.json b/elixir-cinder.json index f47b89a..9222a7c 100644 --- a/elixir-cinder.json +++ b/elixir-cinder.json @@ -1,348 +1,385 @@ { - "scopeName": "source.elixir.cinder", - "injectionSelector": "L:source.elixir", - "name": "elixir-cinder", - "patterns": [{ - "comment": "Handlebars markdown fragment", - "name": "text.html.handlebars", - "begin": "\\s?(```(handlebars|hbs))$", - "beginCaptures": { - "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" - }] + "scopeName": "source.elixir.cinder", + "injectionSelector": "L:source.elixir", + "name": "elixir-cinder", + "patterns": [ + { + "comment": "Handlebars markdown fragment", + "name": "text.html.handlebars", + "begin": "\\s?(```(handlebars|hbs))$", + "beginCaptures": { + "0": { + "name": "comment.documentation.heredoc.elixir" } - ] -} \ No newline at end of file + }, + "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" + } + ] + } + ] +} diff --git a/package.json b/package.json index 6cb8479..431821a 100644 --- a/package.json +++ b/package.json @@ -1,33 +1,35 @@ { - "name": "cinder", - "displayName": "Cinder: A framework for web applications in Elixir", - "description": "Syntax highlighting support for Cinder/Elixir", - "version": "0.1.0", - "author": "James Harton", - "publisher": "jimsy", - "license": "HL3-FULL", - "repository": { - "type": "git", - "url": "https://gitlab.com/jimsy/vscode-cinder.git" - }, - "engines": { - "vscode": "^1.25.1" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "grammars": [{ - "path": "elixir-cinder.json", - "scopeName": "source.elixir.cinder", - "injectTo": [ - "source.elixir" - ], - "embeddedLanguages": { - "meta.embedded.inline.handlebars": "handlebars", - "meta.embedded.inline.js": "js", - "meta.embedded.inline.ts": "ts" - } - }] - } -} \ No newline at end of file + "name": "cinder", + "displayName": "Cinder: A framework for web applications in Elixir", + "description": "Syntax highlighting support for Cinder/Elixir", + "version": "0.1.1", + "author": "James Harton", + "publisher": "jimsy", + "license": "HL3-FULL", + "repository": { + "type": "git", + "url": "https://gitlab.com/jimsy/vscode-cinder.git" + }, + "engines": { + "vscode": "^1.25.1" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "grammars": [ + { + "path": "elixir-cinder.json", + "scopeName": "source.elixir.cinder", + "injectTo": [ + "source.elixir" + ], + "embeddedLanguages": { + "meta.embedded.inline.handlebars": "handlebars", + "meta.embedded.inline.js": "js", + "meta.embedded.inline.ts": "ts" + } + } + ] + } +}