This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Don't die when escaping/unescaping nothing. Release 0.1.9.

  • Loading branch information...
rgrove committed Dec 12, 2011
1 parent 3c4a202 commit b6499015629c6525919bf5a55f4fc4364eda8b0c
Showing with 10 additions and 3 deletions.
  1. +7 −0 HISTORY.md
  2. +2 −2 lib/selleck.js
  3. +1 −1 package.json
View
@@ -1,6 +1,13 @@
Selleck History
===============
+0.1.9 (2011-12-12)
+------------------
+
+* Fixed a bug in the delimiter-escaping change that caused an exception on
+ empty templates.
+
+
0.1.8 (2011-12-12)
------------------
View
@@ -410,12 +410,12 @@ function render(source, view, layout, partials, callback) {
}
function escapeDelimiters(str) {
- return str.replace(/\\{{/g, '__SELLECK_ESCAPED_LD__').
+ return str && str.replace(/\\{{/g, '__SELLECK_ESCAPED_LD__').
replace(/\\}}/g, '__SELLECK_ESCAPED_RD__');
}
function unescapeDelimiters(str) {
- return str.replace(/__SELLECK_ESCAPED_LD__/g, '{{').
+ return str && str.replace(/__SELLECK_ESCAPED_LD__/g, '{{').
replace(/__SELLECK_ESCAPED_RD__/g, '}}');
}
View
@@ -2,7 +2,7 @@
"name" : "selleck",
"description": "Generator for YUI's Handlebars-based user documentation.",
- "version" : "0.1.8",
+ "version" : "0.1.9",
"homepage" : "https://github.com/rgrove/selleck/",
"author" : "Ryan Grove <ryan@wonko.com> (http://wonko.com/)",
"copyright" : "Copyright (c) 2011 Yahoo! Inc. All rights reserved.",

0 comments on commit b649901

Please sign in to comment.