From a07509882e753760f4748be39ec6e343b3cea6d6 Mon Sep 17 00:00:00 2001 From: Adam Schwartz Date: Mon, 30 Sep 2013 16:12:29 -0400 Subject: [PATCH] Allow parentheses in custom syntax blocks, and make quotes optional in the syntax --- log.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log.coffee b/log.coffee index 932dc14..e464813 100644 --- a/log.coffee +++ b/log.coffee @@ -35,7 +35,7 @@ formats = [{ styles: -> ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''] }, { # Custom syntax: [c="color: red"]red[c] - regex: /\[c\=\"([^\")]+)\"\]([^\[)]+)\[c\]/ + regex: /\[c\=(?:\")?([^\"]+)(?:\")?\]([^\[]+)\[c\]/ replacer: (m, p1, p2) -> "%c#{p2}%c" styles: (match) -> [match[1], ''] }]