Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ function getEmbeddedGrammar(
if (scope === "source.yaml") {
return getYamlGrammar();
}
if (scope === "text.tex.latex") {
return { name: "Test LaTeX", scopeName: scope, patterns: [] };
if (scope === "text.html.markdown.math") {
return { name: "Test Markdown Math", scopeName: scope, patterns: [] };
}

// Return a minimal grammar for every embedded language scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ repository:

flow:
patterns:
- include: "#escape"
- include: "#table"
- include: "#admonition"
- include: "#details"
Expand Down Expand Up @@ -377,25 +376,25 @@ repository:
math:
patterns:
- name: markup.math.block.markdown
begin: (?:^|\G)(\$\$)
begin: (?:^|\G)[ \t]*(\$\$)[ \t]*$
beginCaptures:
1: { name: punctuation.definition.math.begin.markdown }
contentName: meta.embedded.block.latex
end: (\$\$)([ \t]*)(\r?\n|\r)?
contentName: meta.embedded.math.markdown
end: (?:^|\G)[ \t]*(\$\$)([ \t]*)(\r?\n|\r)?
endCaptures:
1: { name: punctuation.definition.math.end.markdown }
patterns:
- include: text.tex.latex
- include: text.html.markdown.math
- name: markup.math.block.markdown
begin: (?:^|\G)(\\\[)
begin: (?:^|\G)[ \t]*(\\\[)[ \t]*$
beginCaptures:
1: { name: punctuation.definition.math.begin.markdown }
contentName: meta.embedded.block.latex
end: (\\\])([ \t]*)(\r?\n|\r)?
contentName: meta.embedded.math.markdown
end: (?:^|\G)[ \t]*(\\\])([ \t]*)(\r?\n|\r)?
endCaptures:
1: { name: punctuation.definition.math.end.markdown }
patterns:
- include: text.tex.latex
- include: text.html.markdown.math

fenced_code:
patterns:
Expand Down Expand Up @@ -654,25 +653,25 @@ repository:
inline_math:
patterns:
- name: markup.math.inline.markdown
begin: (\$)(?=[^\s$])
begin: (?<!\\)(\$)(?![\s$])(?=(?:\\.|[^\\$\r\n])*?(?<!\s)\$)
beginCaptures:
1: { name: punctuation.definition.math.begin.markdown }
contentName: meta.embedded.inline.latex
end: (?<!\\)(?<![\s$])(\$)
contentName: meta.embedded.math.markdown
end: (?<!\\)(?<!\s)(\$)
endCaptures:
1: { name: punctuation.definition.math.end.markdown }
patterns:
- include: text.tex.latex
- include: text.html.markdown.math
- name: markup.math.inline.markdown
begin: (\\\()
begin: (\\\()(?=(?:\\[^)]|[^\\\r\n])*?(?<!\\)\\\))
beginCaptures:
1: { name: punctuation.definition.math.begin.markdown }
contentName: meta.embedded.inline.latex
contentName: meta.embedded.math.markdown
end: (?<!\\)(\\\))
endCaptures:
1: { name: punctuation.definition.math.end.markdown }
patterns:
- include: text.tex.latex
- include: text.html.markdown.math

escape:
patterns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@
"text": "\\*",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "Emphasis*",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand All @@ -180,13 +182,15 @@
"text": "\\_",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "Emphasis_",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand All @@ -204,13 +208,15 @@
"text": "\\*",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "*Strong**",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand All @@ -228,13 +234,15 @@
"text": "\\_",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "_Strong__",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1347,13 +1347,15 @@
"text": "\\[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "^1]",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4528,13 +4528,62 @@
"text": "\\!",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "[text](href)",
"text": "[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.inline.markdown",
"punctuation.definition.link.begin.markdown"
]
},
{
"text": "text",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.inline.markdown",
"string.other.link.title.markdown"
]
},
{
"text": "]",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.inline.markdown",
"punctuation.definition.link.end.markdown"
]
},
{
"text": "(",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.inline.markdown",
"punctuation.definition.link.begin.markdown"
]
},
{
"text": "href",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.inline.markdown",
"markup.underline.link.markdown"
]
},
{
"text": ")",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.inline.markdown",
"punctuation.definition.link.end.markdown"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1545,13 +1545,62 @@
"text": "\\!",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "[Text][id]",
"text": "[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"punctuation.definition.link.begin.markdown"
]
},
{
"text": "Text",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"string.other.link.title.markdown"
]
},
{
"text": "]",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"punctuation.definition.link.end.markdown"
]
},
{
"text": "[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"punctuation.definition.link.begin.markdown"
]
},
{
"text": "id",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"constant.other.reference.link.markdown"
]
},
{
"text": "]",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"punctuation.definition.link.end.markdown"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,13 +982,15 @@
"text": "\\+",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "+enter++",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4252,13 +4252,15 @@
"text": "\\[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "text](href)",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1398,13 +1398,42 @@
"text": "\\[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"constant.character.escape.markdown"
]
},
{
"text": "Text][id]",
"text": "Text]",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown"
]
},
{
"text": "[",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"punctuation.definition.link.begin.markdown"
]
},
{
"text": "id",
"scopes": [
"text.html.markdown.python"
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"string.other.link.title.markdown"
]
},
{
"text": "]",
"scopes": [
"text.html.markdown.python",
"meta.paragraph.markdown",
"meta.link.reference.markdown",
"punctuation.definition.link.end.markdown"
]
}
]
Expand Down
Loading