Fist Example:
{ name = 'meta.line.screenplay'; match = '^(\t{4})([^\t].*)(\s*)'; captures = { 1 = { name = 'whitespace'; }; 2 = { name = 'element.character'; }; 3 = { name = 'element.character.eol'; }; }; },
This works great unless the line I'm working on is the last line of the document, in which case the 3rd capture fails. Which makes a certain amount of sense to me because on the last character of the last line of the document there wouldn't be anything to match, not even a newline.
But the following works...
{ name = 'element.action.screenplay'; match = '^[^\t].*((.|-|?|:|;|,)\s*)'; captures = { 1 = { name = 'element.action.eol'; }; }; },
Which is totally nuts, because it's not all that different than the first example.
My question is this: How can I get the 3rd capture of the first example to work when I'm working on the last line of a document?