summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/template.js10
-rw-r--r--test/plugins.js2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/template.js b/lib/template.js
index bc3e53e..8014405 100644
--- a/lib/template.js
+++ b/lib/template.js
@@ -103,16 +103,16 @@ TemplateEngine.prototype.processBlock = function(blk) {
return blk.body;
}
- // Return it as a macro
- return "%+%"+blk.id+"%+%";
+ // Return it as a position marker
+ return "@%@"+blk.id+"@%@";
};
-// Replace blocks by body after processing
-// This is done to avoid that markdown processer parse the block content
+// Replace position markers of blocks by body after processing
+// This is done to avoid that markdown/asciidoc processer parse the block content
TemplateEngine.prototype.replaceBlocks = function(content) {
var that = this;
- return content.replace(/\%\+\%([\s\S]+?)\%\+\%/g, function(match, key) {
+ return content.replace(/\@\%\@([\s\S]+?)\@\%\@/g, function(match, key) {
var blk = that.blocks[key];
if (!blk) return match;
diff --git a/test/plugins.js b/test/plugins.js
index 2309395..d10e0b5 100644
--- a/test/plugins.js
+++ b/test/plugins.js
@@ -230,7 +230,7 @@ describe('Plugins', function () {
it('should correctly process unparsable for asciidoc', function() {
return testTpl('.adoc', '{% test %}**hello**{% endtest %}')
.then(function(content) {
- content.should.equal('<div class="paragraph">\n<p>test**hello**test</p>\n</div>\n');
+ content.should.equal('<div class="paragraph">\n<p>test**hello**test</p>\n</div>');
});
});
});