You will get a big head start by copying the markdown grammar for things like this… also has nice ruby scripts for reformatting
On 20 Jan 2014, at 8:49 AM, Allan Odgaard mailinglist@textmate.org wrote:
On 20 Jan 2014, at 2:41, Matt Neuburg wrote:
repository = { single_bold = { name = 'markup.bold.asciidoc'; begin = '*'; end = '*'; }; };
Adding to my previous reply, if a single asterisk is a user error (when not matched by a bullet list rule or bold) then another approach could be to do something like this:
single_bold = { name = 'markup.bold.asciidoc'; begin = '*'; end = '*|(\n)'; endCaptures = { 1 = { name = 'invalid.illegal.unterminated_asterisk.asciidoc'; }; }; };
Here we terminate the rule either when seeing an asterisk or seeing a newline character, and in the latter case, we scope the newline as “invalid.illegal” which, with most themes, should give it a red background.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate