Skip to content

Commit

Permalink
simple way of escaping curly braces in tags for now. fixes #51.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Apr 26, 2014
1 parent 8ccc3db commit 9a96116
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,14 @@ Element.prototype._parseTags = function(text) {
slash = cap[1] === '/';
param = cap[2].replace(/-/g, ' ');

if (param === 'open') {
out += '{';
continue;
} else if (param === 'close') {
out += '}';
continue;
}

if (param.slice(-3) === ' bg') state = bg;
else if (param.slice(-3) === ' fg') state = fg;
else state = flag;
Expand Down

0 comments on commit 9a96116

Please sign in to comment.