-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grammar Injection doesn't not work on multi-line content #57
Comments
I believe we currently only support injecting into a |
@mjbvz thanks. But would you explain a little bit more about it. What is a "begin...while". TextMate's documentation language_grammars talks about "begin ... end", but it says nothing about "begin...while". What's the difference? Some document for "begin...while" would be perfect for me. Additionally, can I take your comment for that vscode currently doesn't support multi-line grammar injection? |
Okay. Writing a TextMate Grammar: Some Lessons Learned gives a fairly good explanation about "begin..end" and "begin...while". I am wondering is there a plan for vscode-textmate to support "begin...while"? |
Well, I've figured out another way to fullfill my need, which is using a markdown-it plugin, according to the api-markdown document. @mjbvz I think this issue can be closed. Thanks very much. |
Related: #41 |
@zh4ui AFAIK we support "begin...while". Closing this issue as requested. |
@zh4ui How does markdown-it help here? Doesn't it only deal with the markdown preview? I tried {
"begin": "begin",
"end": "end",
"name": "AAA",
"patterns": [
{
"name": "BBB",
"match": ".+"
}
]
} The above pattern correctly recognises each line in the body as However replacing |
Yes, markdown-it only deals with markdown preview. So I gave up trying. I've got an impression that currently grammar injection is just a hack, rather than a useable feature. |
Add support for out variable declaration
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:
The complete source code is at: https:/zh4ui/vscode-markdowntoml.git
Steps to Reproduce:
Reproduces without extensions: No
Copied from original issue: microsoft/vscode#37098
The text was updated successfully, but these errors were encountered: