summaryrefslogtreecommitdiffstats
path: root/lib/template.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2015-09-08 23:57:40 +0200
committerSamy Pesse <samypesse@gmail.com>2015-09-08 23:57:40 +0200
commitaa44a109c6e4ec2814d49e4989d06539aa6dae53 (patch)
tree899dcf536f7641d2ef2267b17cd1736fa4c86e6a /lib/template.js
parent41e5ca8422357797c698180b3d0798f2b907e4cd (diff)
downloadgitbook-aa44a109c6e4ec2814d49e4989d06539aa6dae53.zip
gitbook-aa44a109c6e4ec2814d49e4989d06539aa6dae53.tar.gz
gitbook-aa44a109c6e4ec2814d49e4989d06539aa6dae53.tar.bz2
Use position indicator that doesn't conflict with asciidoc
Diffstat (limited to 'lib/template.js')
-rw-r--r--lib/template.js10
1 files changed, 5 insertions, 5 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;