This is not how the parser works. When one rule has matched a portion of the text, no other rules can match that text.
ok, so only one scope can be applied to each character of the document?
but it appears to me that what you want is for the different rules to overlap, i.e. match the same characters in the document.
yes, for some reason i thought that this was possible. For example, consider the following line:
* this is part of a list _here i want italics_
I thought it was possible to have the characters between the underscores to belong to an 'italic scope' and also a 'list item scope'. I guess you kind of achieve this by naming the italics scope as an extention of the list scope: list.italics or is it recommended to just use an italics scope, losing its relationship with the list?
My next question (which I think I already know the answer to), so if I want to have the equivalent of an underscore italics rule, i have to declare it as an internal pattern to all the patterns I want itallic behaviour inside? I guess this is where you'd use the grammar repository?
Sorry for the potentially obvious questions.
Thanks, Sam