diff --git a/build/generate-latex-grammars.js b/build/generate-latex-grammars.js index e5d897c..672538a 100644 --- a/build/generate-latex-grammars.js +++ b/build/generate-latex-grammars.js @@ -59,17 +59,18 @@ function convertYamlToJson(inputfile, outputfile) { } /** - * Indent text and replace spaces indentation with tabs + * Indent text * @param {number} count The number of tabs to insert at the beginning of each line * @param {string} text A multiline text */ function indent(count, text) { - const indent = new Array(count + 1).join('\t') - return text.replace(/ {4}/gm, '\t').replace(/^/gm, indent) + const indent = new Array(count + 1).join(' ') + return text.replace(/^/gm, indent) } function escapeBackSlash(text) { - return text.replaceAll('\\', '\\\\') + return text + // return text.replaceAll('\\', '\\\\') } /** @@ -90,51 +91,30 @@ function generateCodeBlock(envNames, source, contentName=undefined) { const beginRule = `\\s*\\\\begin\\{${envNameRegex}\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)` const endRule = `\\s*\\\\end\\{${envNameRegex}\\*?\\}` - const jsonCode = `{ - "begin": "${beginRule}", - "end": "${endRule}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{${envNameRegex}\\*?\\})", - "contentName": "${source}", - "patterns": [ - { - "include": "${source}" - } - ] - } - ] -}` - return escapeBackSlash(jsonCode) - + const yamlCode = `- begin: ${beginRule} + end: ${endRule} + captures: + '0': + patterns: + - include: '#begin-env-tokenizer' + patterns: + - include: '#multiline-optional-arg-no-highlight' + - begin: (?:\\G|(?<=\\]))(\\{) + beginCaptures: + '1': + name: punctuation.definition.arguments.begin.latex + end: (\\}) + endCaptures: + '1': + name: punctuation.definition.arguments.end.latex + contentName: variable.parameter.function.latex + - begin: ^(?=\\s*) + end: ^\\s*(?=\\\\end\\{${envNameRegex}\\*?\\}) + contentName: ${source} + patterns: + - include: ${source}` + + return escapeBackSlash(yamlCode) } /** @@ -151,29 +131,20 @@ function generateMintedBlock(envNames, language, source, contentName=undefined) var languageRegex = '(?:' + language.join('|') + ')' var envNameRegex = '(?:' + envNames.join('|') + ')' - const jsonCode = `{ - "begin": "(?:\\G|(?<=\\]))(\\{)(${languageRegex})(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{${envNameRegex}\\})", - "contentName": "${contentName}", - "patterns": [ - { - "include": "${source}" - } - ] -}` - - return escapeBackSlash(jsonCode) + const yamlCode = `- begin: (?:\\G|(?<=\\]))(\\{)(${languageRegex})(\\}) + beginCaptures: + '1': + name: punctuation.definition.arguments.begin.latex + '2': + name: variable.parameter.function.latex + '3': + name: punctuation.definition.arguments.end.latex + end: ^\\s*(?=\\\\end\\{${envNameRegex}\\}) + contentName: ${contentName} + patterns: + - include: ${source}` + + return escapeBackSlash(yamlCode) } /** @@ -190,46 +161,27 @@ function generateRobustExternalizeBlock(envNames, language, source, contentName= var languageRegex = '(?i:' + language.join('|') + ')' var envNameRegex = '(?:RobExt)?' + '(?:' + envNames.join('|') + ')' - const jsonCode = `{ - "begin": "\\G(\\{)(?:__|[a-z\\s]*)${languageRegex}", - "end": "(?=\\\\end\\{${envNameRegex}\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{${envNameRegex}\\})", - "contentName": "${contentName}", - "patterns": [ - { - "include": "${source}" - } - ] - } - ] -}` - - return escapeBackSlash(jsonCode) + const yamlCode = `- begin: \\G(\\{)(?:__|[a-z\\s]*)${languageRegex} + end: (?=\\\\end\\{${envNameRegex}\\}) + beginCaptures: + '1': + name: punctuation.definition.arguments.begin.latex + patterns: + - begin: \\G + end: (\\})\\s*$ + endCaptures: + '1': + name: punctuation.definition.arguments.end.latex + patterns: + - include: text.tex#braces + - include: $base + - begin: ^(\\s*) + end: ^\\s*(?=\\\\end\\{${envNameRegex}\\}) + contentName: ${contentName} + patterns: + - include: ${source}` + + return escapeBackSlash(yamlCode) } function main() { @@ -242,18 +194,21 @@ function main() { console.log('Generating TeX.tmLanguage from src/') convertYamlToJson(path.join(syntaxesSrcDir, 'TeX.tmLanguage.yaml'), path.join(syntaxesDir, 'TeX.tmLanguage.json')) - var mintedDefinitions = mintedLanguages.map(language => generateMintedBlock(mintedEnvs, language.language, language.source, language?.contentName)).join(',\n') - var codeDefinitions = codeLanguages.map(language => generateCodeBlock(language.name, language.source, language?.contentName)).join(',\n') - var robustExternalizeDefinitions = robustExternalizeLanguages.map(language => generateRobustExternalizeBlock(robustExternalizeEnvs, language.language, language.source, language?.contentName)).join(',\n') + var mintedDefinitions = mintedLanguages.map(language => generateMintedBlock(mintedEnvs, language.language, language.source, language?.contentName)).join('\n') + var codeDefinitions = codeLanguages.map(language => generateCodeBlock(language.name, language.source, language?.contentName)).join('\n') + var robustExternalizeDefinitions = robustExternalizeLanguages.map(language => generateRobustExternalizeBlock(robustExternalizeEnvs, language.language, language.source, language?.contentName)).join('\n') console.log('Generating LaTeX.tmLanguage from src/') - convertYamlToJson(path.join(syntaxesSrcDir, 'LaTeX.tmLanguage.base.yaml'), path.join(syntaxesSrcDir, 'LaTeX.tmLanguage.json')) - let text = fs.readFileSync(path.join(syntaxesSrcDir, 'LaTeX.tmLanguage.json'), {encoding: 'utf8'}) - text = text.replace(/^\s*\{(\n\s*)?"includeMintedblocks": ""(\n\s*)?\}/gm, indent(4, mintedDefinitions)) - text = text.replace(/^\s*\{(\n\s*)?"includeRobustExternalizeBlocks": ""(\n\s*)?\}/gm, indent(4, robustExternalizeDefinitions)) - text = text.replace(/^\s*\{(\n\s*)?"includeCodeBlocks": ""(\n\s*)?\}/gm, indent(2, codeDefinitions)) - fs.writeFileSync(path.join(syntaxesDir, 'LaTeX.tmLanguage.json'), text) + try { + let yamlGrammar = fs.readFileSync(path.join(syntaxesSrcDir, 'LaTeX.tmLanguage.base.yaml'), {encoding: 'utf-8'}) + yamlGrammar = yamlGrammar.replace(/^\s{2}- includeRobustExternalizeBlocks: ''/m, indent(2, robustExternalizeDefinitions)) + yamlGrammar = yamlGrammar.replace(/^- includeCodeBlocks: ''/m, codeDefinitions) + yamlGrammar = yamlGrammar.replace(/^\s{2}- includeMintedblocks: ''/m, indent(2, mintedDefinitions)) + const latexGrammar = yaml.load(yamlGrammar) + fs.writeFileSync(path.join(syntaxesDir, 'LaTeX.tmLanguage.json'), JSON.stringify(latexGrammar, undefined, 4)) + } catch (error) { + console.log(error) + } } - module.exports = main diff --git a/syntaxes/LaTeX.tmLanguage.json b/syntaxes/LaTeX.tmLanguage.json index cd965af..75c02cf 100644 --- a/syntaxes/LaTeX.tmLanguage.json +++ b/syntaxes/LaTeX.tmLanguage.json @@ -163,365 +163,8 @@ { "include": "#multiline-optional-arg-no-highlight" }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:asy|asymptote))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.asy", - "patterns": [ - { - "include": "source.asy" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:bash))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.shell", - "patterns": [ - { - "include": "source.shell" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:c|cpp))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.cpp.embedded.latex", - "patterns": [ - { - "include": "source.cpp.embedded.latex" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:css))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.css", - "patterns": [ - { - "include": "source.css" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:gnuplot))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.gnuplot", - "patterns": [ - { - "include": "source.gnuplot" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:hs|haskell))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.haskell", - "patterns": [ - { - "include": "source.haskell" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:html))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "text.html", - "patterns": [ - { - "include": "text.html.basic" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:java))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.java", - "patterns": [ - { - "include": "source.java" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:jl|julia))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.julia", - "patterns": [ - { - "include": "source.julia" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:js|javascript))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.js", - "patterns": [ - { - "include": "source.js" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:lua))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.lua", - "patterns": [ - { - "include": "source.lua" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:py|python|sage))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.python", - "patterns": [ - { - "include": "source.python" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:rb|ruby))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.ruby", - "patterns": [ - { - "include": "source.ruby" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:rust))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.rust", - "patterns": [ - { - "include": "source.rust" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:ts|typescript))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.ts", - "patterns": [ - { - "include": "source.ts" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:xml))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "text.xml", - "patterns": [ - { - "include": "text.xml" - } - ] - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)((?:yaml))(\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - }, - "2": { - "name": "variable.parameter.function.latex" - }, - "3": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", - "contentName": "source.yaml", - "patterns": [ - { - "include": "source.yaml" - } - ] - }, { - "begin": "(?:\\G|(?<=\\]))(\\{)([a-zA-Z]*)(\\})", + "begin": "(?:\\G|(?<=\\]))(\\{)((?:asy|asymptote))(\\})", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.latex" @@ -533,1283 +176,1640 @@ "name": "punctuation.definition.arguments.end.latex" } }, - "contentName": "meta.function.embedded.latex", - "end": "^\\s*(?=\\\\end\\{(?:lstlisting|minted|pyglist)\\})", - "name": "meta.embedded.block.generic.latex" - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:asy|asycode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:asy|asycode)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:asy|asycode)\\*?\\})", - "contentName": "source.asymptote", - "patterns": [ - { - "include": "source.asymptote" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:cppcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:cppcode)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:cppcode)\\*?\\})", - "contentName": "source.cpp.embedded.latex", - "patterns": [ - { - "include": "source.cpp.embedded.latex" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:dot2tex|dotcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:dot2tex|dotcode)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:dot2tex|dotcode)\\*?\\})", - "contentName": "source.dot", - "patterns": [ - { - "include": "source.dot" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:gnuplot)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:gnuplot)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:gnuplot)\\*?\\})", - "contentName": "source.gnuplot", - "patterns": [ - { - "include": "source.gnuplot" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:hscode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:hscode)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:hscode)\\*?\\})", - "contentName": "source.haskell", - "patterns": [ - { - "include": "source.haskell" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\})", - "contentName": "source.julia", - "patterns": [ - { - "include": "source.julia" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\})", - "contentName": "source.julia", - "patterns": [ - { - "include": "source.julia" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:luacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:luacode)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:luacode)\\*?\\})", - "contentName": "source.lua", - "patterns": [ - { - "include": "source.lua" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\})", - "contentName": "source.python", - "patterns": [ - { - "include": "source.python" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\})", - "contentName": "source.python", - "patterns": [ - { - "include": "source.python" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\})", - "contentName": "source.python", - "patterns": [ - { - "include": "source.python" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:scalacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:scalacode)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:scalacode)\\*?\\})", - "contentName": "source.scala", - "patterns": [ - { - "include": "source.scala" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", - "end": "\\s*\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}", - "captures": { - "0": { - "patterns": [ - { - "include": "#begin-env-tokenizer" - } - ] - } - }, - "patterns": [ - { - "include": "#multiline-optional-arg-no-highlight" - }, - { - "begin": "(?:\\G|(?<=\\]))(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "contentName": "variable.parameter.function.latex" - }, - { - "begin": "^(?=\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\})", - "contentName": "source.python", - "patterns": [ - { - "include": "source.python" - } - ] - } - ] - }, - { - "begin": "\\s*\\\\begin\\{([a-zA-Z]*code|lstlisting|minted|pyglist)\\*?\\}(?:\\[.*\\])?(?:\\{.*\\})?", - "captures": { - "0": { + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.asy", "patterns": [ { - "include": "#begin-env-tokenizer" + "include": "source.asy" } ] - } - }, - "contentName": "meta.function.embedded.latex", - "end": "\\\\end\\{\\1\\}(?:\\s*\\n)?", - "name": "meta.embedded.block.generic.latex" - }, - { - "begin": "((?:^\\s*)?\\\\begin\\{((?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?))\\})(?:\\[[^\\]]*\\]){,2}(?=\\{)", - "captures": { - "1": { + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:bash))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.shell", "patterns": [ { - "include": "#begin-env-tokenizer" + "include": "source.shell" } ] - } - }, - "end": "(\\\\end\\{\\2\\})", - "patterns": [ - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:asy|asymptote)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.asy", - "patterns": [ - { - "include": "source.asy" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:bash)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.shell", - "patterns": [ - { - "include": "source.shell" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:c|cpp)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.cpp.embedded.latex", - "patterns": [ - { - "include": "source.cpp.embedded.latex" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:css)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.css", - "patterns": [ - { - "include": "source.css" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:gnuplot)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.gnuplot", - "patterns": [ - { - "include": "source.gnuplot" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:hs|haskell)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.haskell", - "patterns": [ - { - "include": "source.haskell" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:html)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "text.html", - "patterns": [ - { - "include": "text.html.basic" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:java)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.java", - "patterns": [ - { - "include": "source.java" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:jl|julia)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.julia", - "patterns": [ - { - "include": "source.julia" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:js|javascript)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.js", - "patterns": [ - { - "include": "source.js" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:lua)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.lua", - "patterns": [ - { - "include": "source.lua" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:py|python|sage)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.python", - "patterns": [ - { - "include": "source.python" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:rb|ruby)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.ruby", - "patterns": [ - { - "include": "source.ruby" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:rust)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.rust", - "patterns": [ - { - "include": "source.rust" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:ts|typescript)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.ts", - "patterns": [ - { - "include": "source.ts" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:xml)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "text.xml", - "patterns": [ - { - "include": "text.xml" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:yaml)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "source.yaml", - "patterns": [ - { - "include": "source.yaml" - } - ] - } - ] - }, - { - "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:tikz|tikzpicture)", - "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "beginCaptures": { - "1": { - "name": "punctuation.definition.arguments.begin.latex" - } - }, - "patterns": [ - { - "begin": "\\G", - "end": "(\\})\\s*$", - "endCaptures": { - "1": { - "name": "punctuation.definition.arguments.end.latex" - } - }, - "patterns": [ - { - "include": "text.tex#braces" - }, - { - "include": "$base" - } - ] - }, - { - "begin": "^(\\s*)", - "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", - "contentName": "text.tex.latex", - "patterns": [ - { - "include": "text.tex.latex" - } - ] - } - ] - }, + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:c|cpp))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.cpp.embedded.latex", + "patterns": [ + { + "include": "source.cpp.embedded.latex" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:css))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:gnuplot))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.gnuplot", + "patterns": [ + { + "include": "source.gnuplot" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:hs|haskell))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.haskell", + "patterns": [ + { + "include": "source.haskell" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:html))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "text.html", + "patterns": [ + { + "include": "text.html.basic" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:java))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.java", + "patterns": [ + { + "include": "source.java" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:jl|julia))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:js|javascript))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:lua))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:py|python|sage))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:rb|ruby))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.ruby", + "patterns": [ + { + "include": "source.ruby" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:rust))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.rust", + "patterns": [ + { + "include": "source.rust" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:ts|typescript))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:xml))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "text.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)((?:yaml))(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "end": "^\\s*(?=\\\\end\\{(?:minted|lstlisting|pyglist)\\})", + "contentName": "source.yaml", + "patterns": [ + { + "include": "source.yaml" + } + ] + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)([a-zA-Z]*)(\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + }, + "2": { + "name": "variable.parameter.function.latex" + }, + "3": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "meta.function.embedded.latex", + "end": "^\\s*(?=\\\\end\\{(?:lstlisting|minted|pyglist)\\})", + "name": "meta.embedded.block.generic.latex" + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:asy|asycode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:asy|asycode)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:asy|asycode)\\*?\\})", + "contentName": "source.asymptote", + "patterns": [ + { + "include": "source.asymptote" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:cppcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:cppcode)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:cppcode)\\*?\\})", + "contentName": "source.cpp.embedded.latex", + "patterns": [ + { + "include": "source.cpp.embedded.latex" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:dot2tex|dotcode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:dot2tex|dotcode)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:dot2tex|dotcode)\\*?\\})", + "contentName": "source.dot", + "patterns": [ + { + "include": "source.dot" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:gnuplot)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:gnuplot)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:gnuplot)\\*?\\})", + "contentName": "source.gnuplot", + "patterns": [ + { + "include": "source.gnuplot" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:hscode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:hscode)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:hscode)\\*?\\})", + "contentName": "source.haskell", + "patterns": [ + { + "include": "source.haskell" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:jlcode|jlverbatim|jlblock|jlconcode|jlconsole|jlconverbatim)\\*?\\})", + "contentName": "source.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:juliacode|juliaverbatim|juliablock|juliaconcode|juliaconsole|juliaconverbatim)\\*?\\})", + "contentName": "source.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:luacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:luacode)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:luacode)\\*?\\})", + "contentName": "source.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:pycode|pyverbatim|pyblock|pyconcode|pyconsole|pyconverbatim)\\*?\\})", + "contentName": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:pylabcode|pylabverbatim|pylabblock|pylabconcode|pylabconsole|pylabconverbatim)\\*?\\})", + "contentName": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:sageblock|sagesilent|sageverbatim|sageexample|sagecommandline|python|pythonq|pythonrepl)\\*?\\})", + "contentName": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:scalacode)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:scalacode)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:scalacode)\\*?\\})", + "contentName": "source.scala", + "patterns": [ + { + "include": "source.scala" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}(?:\\[[a-zA-Z0-9_-]*\\])?(?=\\[|\\{|\\s*$)", + "end": "\\s*\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\}", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "patterns": [ + { + "include": "#multiline-optional-arg-no-highlight" + }, + { + "begin": "(?:\\G|(?<=\\]))(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "contentName": "variable.parameter.function.latex" + }, + { + "begin": "^(?=\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:sympycode|sympyverbatim|sympyblock|sympyconcode|sympyconsole|sympyconverbatim)\\*?\\})", + "contentName": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + { + "begin": "\\s*\\\\begin\\{([a-zA-Z]*code|lstlisting|minted|pyglist)\\*?\\}(?:\\[.*\\])?(?:\\{.*\\})?", + "captures": { + "0": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "contentName": "meta.function.embedded.latex", + "end": "\\\\end\\{\\1\\}(?:\\s*\\n)?", + "name": "meta.embedded.block.generic.latex" + }, + { + "begin": "((?:^\\s*)?\\\\begin\\{((?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?))\\})(?:\\[[^\\]]*\\]){,2}(?=\\{)", + "captures": { + "1": { + "patterns": [ + { + "include": "#begin-env-tokenizer" + } + ] + } + }, + "end": "(\\\\end\\{\\2\\})", + "patterns": [ + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:asy|asymptote)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.asy", + "patterns": [ + { + "include": "source.asy" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:bash)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.shell", + "patterns": [ + { + "include": "source.shell" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:c|cpp)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.cpp.embedded.latex", + "patterns": [ + { + "include": "source.cpp.embedded.latex" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:css)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.css", + "patterns": [ + { + "include": "source.css" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:gnuplot)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.gnuplot", + "patterns": [ + { + "include": "source.gnuplot" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:hs|haskell)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.haskell", + "patterns": [ + { + "include": "source.haskell" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:html)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "text.html", + "patterns": [ + { + "include": "text.html.basic" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:java)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.java", + "patterns": [ + { + "include": "source.java" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:jl|julia)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.julia", + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:js|javascript)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.js", + "patterns": [ + { + "include": "source.js" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:lua)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.lua", + "patterns": [ + { + "include": "source.lua" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:py|python|sage)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.python", + "patterns": [ + { + "include": "source.python" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:rb|ruby)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.ruby", + "patterns": [ + { + "include": "source.ruby" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:rust)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.rust", + "patterns": [ + { + "include": "source.rust" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:ts|typescript)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.ts", + "patterns": [ + { + "include": "source.ts" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:xml)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "text.xml", + "patterns": [ + { + "include": "text.xml" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:yaml)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "source.yaml", + "patterns": [ + { + "include": "source.yaml" + } + ] + } + ] + }, + { + "begin": "\\G(\\{)(?:__|[a-z\\s]*)(?i:tikz|tikzpicture)", + "end": "(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "beginCaptures": { + "1": { + "name": "punctuation.definition.arguments.begin.latex" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(\\})\\s*$", + "endCaptures": { + "1": { + "name": "punctuation.definition.arguments.end.latex" + } + }, + "patterns": [ + { + "include": "text.tex#braces" + }, + { + "include": "$base" + } + ] + }, + { + "begin": "^(\\s*)", + "end": "^\\s*(?=\\\\end\\{(?:RobExt)?(?:CacheMeCode|PlaceholderPathFromCode\\*?|PlaceholderFromCode\\*?|SetPlaceholderCode\\*?)\\})", + "contentName": "text.tex.latex", + "patterns": [ + { + "include": "text.tex.latex" + } + ] + } + ] + }, { "begin": "\\G(\\{)", "beginCaptures": {