diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-09-09 00:01:43 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-09-09 00:01:43 +0200 |
commit | 471c124a988adeeafead67d8ae12bb9433e8e5b4 (patch) | |
tree | 899dcf536f7641d2ef2267b17cd1736fa4c86e6a /lib | |
parent | 53af8b2bb661e5aebb6732bee24464e2b1068994 (diff) | |
parent | aa44a109c6e4ec2814d49e4989d06539aa6dae53 (diff) | |
download | gitbook-471c124a988adeeafead67d8ae12bb9433e8e5b4.zip gitbook-471c124a988adeeafead67d8ae12bb9433e8e5b4.tar.gz gitbook-471c124a988adeeafead67d8ae12bb9433e8e5b4.tar.bz2 |
Merge pull request #908 from GitbookIO/fix/asciidoc_blocks
Fix blocks in asciidoc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/template.js | 10 |
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; |