Thursday, August 16, 2012 [Tweets] [Favorites]

Injection Grammars & Project Variables

Allan Odgaard:

We could modify this command to support the special issue scheme, but that is not elegant. Instead we make a minor but important change to the injection grammar from above. We change the name key to markup.underline.link.$2.hyperlink. What we did was add $2 which is the second capture from the regular expression, namely the URL scheme (more about syntax allowed in format strings).

[…]

What’s great about this is that we can now create a new command, still using enter as key equivalent, but using a more specific scope selector so that it only targets issue links.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment