Skip to content

Commit

Permalink
Allow parentheses in custom syntax blocks, and make quotes optional i…
Browse files Browse the repository at this point in the history
…n the syntax
  • Loading branch information
adamschwartz committed Sep 30, 2013
1 parent 18c5d89 commit a075098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log.coffee
Expand Up @@ -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], '']
}]
Expand Down

0 comments on commit a075098

Please sign in to comment.