[TxMt] Injecting Grammar Into Injected Grammar?

Robert J. Rockefeller bob at bobrockefeller.com
Tue Feb 10 13:12:01 UTC 2015


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. I wanted my injected custom YAML to be injected into Markdown, but it’s not. I guess injecting into YAML is not picked up when YAML is injected into Markdown. :(

Is that how it is expected to work?

Is there another way to get injections to work on top of injections like this:

Custom YAML -> YAML -> Markdown

Or do I have to fork the YAML grammar?

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



More information about the textmate mailing list