I'm having a hard time implementing nested patterns to create custom grammar highlights. I already spent days reading (and rereading, multiple times) TextMate's original grammar webpage, and also checking other Atom language packages, but still can't solve this problem.
Here is a very basic language snippet, for a fake language ..
different items per line %%
more items %%
Here's a very simple snippet from my language.cson file:
comment: 'matches everything upto "%%" at end of line'
comment: 'this should find a match *INSIDE* the parent match'
So basically, the grammar detect a line in the first 'pattern'. Then in the child 'pattern', it detects another match inside the parent match.
However, this is not working. Only the parent match is correctly found. Atom somehow appears to be ignoring the child pattern. This has nothing to do with regex not found because even a pattern of (.*), which should match any character, is not returning a result.
P.S. Ignore the names 'keyword' and 'illegal.invalid', these just show the matches in clear contrasting colors to help with debugging the highlighting.