Custom language definition works except in Markdown fences

I have built my first language definition for Nova for a toy programming language called ObjoBasic. The definition appears to be working as expected in the editor when I set the document type to “ObjoBasic” - Nova correctly highlights tokens, etc.

However, if I create a Markdown document and put in a code fence like this:

Some code

Nova not only doesn’t highlight the ObjoBasic in the code fence but the console throws several identical errors saying "[objobasic] Error parsing: The language objobasic could not be loaded".

I’m not sure what I’ve done wrong in my definition to cause this. It’s frustrating because I appear to be very close to getting the definition to work but it’s important to me that the highlighting also be able to work within Markdown documents.

If your language is a legacy (regex) grammar, it won’t be possible to use it within code fences. Our Markdown syntax is based around Tree-sitter, and fences only support injection of other Tree-sitter languages. (For more info on injections, see here.)

If your language is indeed using Tree-sitter, check to make sure you have an injection expression defined in your syntax file (see also the above link on injections).

Bingo. It’s a legacy regex grammar. That’ll be why.

Shame but thank you for clarifying.