Skip to content
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 #37098

Closed
r-laf opened this issue Oct 29, 2017 · 1 comment
Closed

Grammar Injection doesn't not work on multi-line content #37098

r-laf opened this issue Oct 29, 2017 · 1 comment
Assignees
Labels
markdown Markdown support issues

Comments

@r-laf
Copy link

r-laf commented Oct 29, 2017

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)

begin-toml-end

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:/zh4ui/vscode-markdowntoml.git

  • VSCode Version: Version 1.17.2 (1.17.2)
  • OS Version: macOS 10.13 (17A405)

Steps to Reproduce:

  1. install the Better TOML for TOML colorizer
  2. git clone https:/zh4ui/vscode-markdowntoml.git
  3. cd vscode-markdowntoml && code .
  4. F5 to debug the code
  5. Create a markdown file in the [Extension Development Host]
  6. type in the content
begin a = "b"
c = "d"
end

Reproduces without extensions: No

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 30, 2017

This issue was moved to microsoft/vscode-textmate#57

@mjbvz mjbvz closed this as completed Oct 30, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
markdown Markdown support issues
Projects
None yet
Development

No branches or pull requests

2 participants