From @zh4ui on October 29, 2017 13:8
I tried to inject TOML grammar into markdown, however the TOML colorizer only works on the first line (i.e. a = "b" in the image), it doesn't work on the following line (i.e. d = "c" in the image)

My tmLanguage.json for the injection is like:
{
"fileTypes": [],
"injectionSelector": "text.html.markdown",
"name": "tomlfrontmatter",
"patterns": [
{
"begin": "\\Abegin\\s*",
"end": "(^|\\G)end\\s*$",
"patterns": [
{
"include": "source.toml"
}
]
}
],
"scopeName": "toml.frontmatter.markdown"
}
The complete source code is at: https://github.com/zh4ui/vscode-markdowntoml.git
- VSCode Version: Version 1.17.2 (1.17.2)
- OS Version: macOS 10.13 (17A405)
Steps to Reproduce:
- install the Better TOML for TOML colorizer
- git clone https://github.com/zh4ui/vscode-markdowntoml.git
- cd vscode-markdowntoml && code .
- F5 to debug the code
- Create a markdown file in the [Extension Development Host]
- type in the content
begin a = "b"
c = "d"
end
Reproduces without extensions: No
Copied from original issue: microsoft/vscode#37098
From @zh4ui on October 29, 2017 13:8
I tried to inject TOML grammar into markdown, however the TOML colorizer only works on the first line (i.e. a = "b" in the image), it doesn't work on the following line (i.e. d = "c" in the image)
My tmLanguage.json for the injection is like:
{ "fileTypes": [], "injectionSelector": "text.html.markdown", "name": "tomlfrontmatter", "patterns": [ { "begin": "\\Abegin\\s*", "end": "(^|\\G)end\\s*$", "patterns": [ { "include": "source.toml" } ] } ], "scopeName": "toml.frontmatter.markdown" }The complete source code is at: https://github.com/zh4ui/vscode-markdowntoml.git
Steps to Reproduce:
Reproduces without extensions: No
Copied from original issue: microsoft/vscode#37098