summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-10-14 11:11:24 -0500
committerkpdecker <kpdecker@gmail.com>2013-10-14 22:50:50 -0500
commit31f7c25a8faac32e4996d95ccec509ead41f3f3c (patch)
tree1f8e672b06c7d9be52f4237cec3f0b6df455cca4 /src
parentc776f171aba41dc8cc620b26372f8f1eda9525e1 (diff)
downloadhandlebars.js-31f7c25a8faac32e4996d95ccec509ead41f3f3c.zip
handlebars.js-31f7c25a8faac32e4996d95ccec509ead41f3f3c.tar.gz
handlebars.js-31f7c25a8faac32e4996d95ccec509ead41f3f3c.tar.bz2
Use ~ rather than () for whitespace control.
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.l8
-rw-r--r--src/handlebars.yy4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/handlebars.l b/src/handlebars.l
index 740015b..ddb7fe9 100644
--- a/src/handlebars.l
+++ b/src/handlebars.l
@@ -9,11 +9,11 @@ function strip(start, end) {
%}
-LEFT_STRIP "("
-RIGHT_STRIP ")"
+LEFT_STRIP "~"
+RIGHT_STRIP "~"
-LOOKAHEAD [=)}\s\/.]
-LITERAL_LOOKAHEAD [)}\s]
+LOOKAHEAD [=~}\s\/.]
+LITERAL_LOOKAHEAD [~}\s]
/*
ID is the inverse of control characters.
diff --git a/src/handlebars.yy b/src/handlebars.yy
index 6ee2207..0afd2cb 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -6,8 +6,8 @@
function stripFlags(open, close) {
return {
- left: open[2] === '(',
- right: close[0] === ')' || close[1] === ')'
+ left: open[2] === '~',
+ right: close[0] === '~' || close[1] === '~'
};
}