Update grammars (#186752)

This commit is contained in:
Alex Ross
2023-06-30 18:14:40 +02:00
committed by GitHub
parent 69cd1439e5
commit c778cc6117
19 changed files with 474 additions and 165 deletions

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jlelong/vscode-latex-basics/commit/4b19be579cb4a3c680f8b4bb613dcebfac826f8b",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/7adad0868ecafbb1df978f1e052d6c3c85c38732",
"name": "BibTeX",
"scopeName": "text.bibtex",
"comment": "Grammar based on description from http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment\n\t\n\tTODO: Does not support @preamble\n\t",
@@ -345,7 +345,7 @@
"end": "(?!\\G)",
"patterns": [
{
"begin": "%",
"begin": "(?<!\\\\)%",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.bibtex"

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jlelong/vscode-latex-basics/commit/580c019674f82ef887a6dcce7bfc75ab0b58486d",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/30adbfae9dcb0a6477584247ac477f13845d1f5f",
"name": "LaTeX",
"scopeName": "text.tex.latex",
"patterns": [
@@ -102,7 +102,7 @@
"name": "punctuation.definition.arguments.begin.latex"
}
},
"comment": "this works OK with all kinds of stuff as long as the section is one line",
"comment": "this works OK with all kinds of crazy stuff as long as section is one line",
"contentName": "entity.name.section.latex",
"end": "\\}",
"endCaptures": {
@@ -1064,7 +1064,7 @@
]
},
{
"begin": "((?:\\s*)\\\\begin\\{([a-zA-Z]*code(?:\\*)?)\\}(?:\\[.*\\])?(?:\\{.*\\})?)",
"begin": "((?:\\s*)\\\\begin\\{([a-zA-Z]*code|lstlisting|minted|pyglist)(?:\\*)?\\}(?:\\[.*\\])?(?:\\{.*\\})?)",
"captures": {
"1": {
"patterns": [
@@ -2071,28 +2071,19 @@
]
},
{
"name": "string.quoted.double.latex",
"match": "(?<!\\\\)(\\`\\`)(?:.*?(?<!\\\\))(\\'\\'|\\\")",
"captures": {
"begin": "(?<!\\\\)(\\`\\`)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.string.begin.latex"
},
"2": {
"name": "punctuation.definition.string.end.latex"
}
}
},
{
"name": "string.quoted.single.latex",
"match": "(?<!\\\\)(\\`)(?:.*?(?<!\\\\))(\\')",
"captures": {
},
"end": "(?<!\\\\)(\\'\\'|\")",
"endCaptures": {
"1": {
"name": "punctuation.definition.string.begin.latex"
},
"2": {
"name": "punctuation.definition.string.end.latex"
}
}
},
"name": "string.quoted.double.latex"
},
{
"begin": "\\$\\$",
@@ -2371,4 +2362,4 @@
]
}
}
}
}

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jlelong/vscode-latex-basics/commit/2be145a0bde15dfaf367676a1227c8a701792f90",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/3ae82b457c28f0368cbbb47024b0245ef1ff3d33",
"name": "TeX",
"scopeName": "text.tex",
"patterns": [
@@ -45,7 +45,7 @@
"end": "(?!\\G)",
"patterns": [
{
"begin": "%:",
"begin": "%:?",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.tex"
@@ -63,16 +63,6 @@
},
"end": "$\\n?",
"name": "comment.line.percentage.directive.tex"
},
{
"begin": "%",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.tex"
}
},
"end": "$\\n?",
"name": "comment.line.percentage.tex"
}
]
},

View File

@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jlelong/vscode-latex-basics/commit/8c2574ce3dbc6e24451bb81c1ee2bc3b1ffb75f3",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/01814480aecb9e1280fce20b7302178630755da9",
"name": "Markdown",
"scopeName": "text.tex.markdown_latex_combined",
"patterns": [
@@ -2399,7 +2399,7 @@
"name": "punctuation.definition.string.end.markdown"
}
},
"match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (?:(<)([^\\>]+?)(>)|(\\S+?)) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n",
"match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (?:(<)((?:\\\\[<>]|[^<>\\n])*)(>)|(\\S+?)) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n",
"name": "meta.link.reference.def.markdown"
},
"list_paragraph": {
@@ -2641,47 +2641,50 @@
"5": {
"name": "punctuation.definition.metadata.markdown"
},
"6": {
"name": "punctuation.definition.link.markdown"
},
"7": {
"name": "markup.underline.link.image.markdown"
"name": "punctuation.definition.link.markdown"
},
"8": {
"name": "punctuation.definition.link.markdown"
"name": "markup.underline.link.image.markdown"
},
"9": {
"name": "string.other.link.description.title.markdown"
"name": "punctuation.definition.link.markdown"
},
"10": {
"name": "punctuation.definition.string.markdown"
},
"11": {
"name": "punctuation.definition.string.markdown"
"name": "markup.underline.link.image.markdown"
},
"12": {
"name": "string.other.link.description.title.markdown"
},
"13": {
"name": "punctuation.definition.string.markdown"
"name": "punctuation.definition.string.begin.markdown"
},
"14": {
"name": "punctuation.definition.string.markdown"
"name": "punctuation.definition.string.end.markdown"
},
"15": {
"name": "string.other.link.description.title.markdown"
},
"16": {
"name": "punctuation.definition.string.markdown"
"name": "punctuation.definition.string.begin.markdown"
},
"17": {
"name": "punctuation.definition.string.markdown"
"name": "punctuation.definition.string.end.markdown"
},
"18": {
"name": "string.other.link.description.title.markdown"
},
"19": {
"name": "punctuation.definition.string.begin.markdown"
},
"20": {
"name": "punctuation.definition.string.end.markdown"
},
"21": {
"name": "punctuation.definition.metadata.markdown"
}
},
"match": "(?x)\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n (<?)(\\S+?)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n",
"match": "(?x)\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)((?:\\\\[<>]|[^<>\\n])*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n",
"name": "meta.image.inline.markdown"
},
"image-ref": {
@@ -2876,7 +2879,7 @@
"name": "punctuation.definition.metadata.markdown"
}
},
"match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)([^<>\\n]*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n # The title \n (?:\n ((\\()[^()]*(\\))) # Match title in parens…\n | ((\")[^\"]*(\")) # or in double quotes…\n | ((')[^']*(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n",
"match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)((?:\\\\[<>]|[^<>\\n])*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n # The title \n (?:\n ((\\()[^()]*(\\))) # Match title in parens…\n | ((\")[^\"]*(\")) # or in double quotes…\n | ((')[^']*(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n",
"name": "meta.link.inline.markdown"
},
"link-ref": {