[TxMt] Re: Injecting Grammar Into Injected Grammar?

Robert J. Rockefeller bob at bobrockefeller.com
Tue Feb 10 14:17:37 UTC 2015


Yes. Like this:

{	name = 'text.html.markdown.yaml';
	begin = '\A-{3}';
	end = '-{3}';
	patterns = (
		{ include = 'source.yaml'; },
	);
},

Bob
-------------------
Robert J. Rockefeller
Richmond Hill, GA
www.bobrockefeller.com

> On Feb 10, 2015, at 9:03 AM, Allan Odgaard <mailinglist at textmate.org> wrote:
> 
> On 10 Feb 2015, at 20:12, Robert J. Rockefeller wrote:
> 
>> I have a custom Markdown grammar that I inject into the official Markdown grammar with an injection selector of L:text.html.markdown and it works fine. That custom grammar defines the starting content of a markdown file between -{3} and -{3} as YAML.
>> 
>> I have a custom YAML grammar that I inject into the official YAML grammar with an injection selector of L:source.yaml and it also works fine. That custom grammar defines runs of entity.name.value.yaml.
>> 
>> But my custom YAML injection does not work in Markdown […]
> 
> Does the grammar you inject into Markdown declare the source.yaml scope?
> 
> That would be required for the injected YAML grammar to (also) match.
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list