mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
29 lines
622 B
JavaScript
29 lines
622 B
JavaScript
var nunjucks = require('nunjucks');
|
|
|
|
function TemplatingEngine(book) {
|
|
this.book = book;
|
|
this.log = book.log;
|
|
|
|
|
|
this.nunjucks = new nunjucks.Environment(
|
|
this.loader,
|
|
{
|
|
// Escaping is done after by the asciidoc/markdown parser
|
|
autoescape: false,
|
|
|
|
// Syntax
|
|
tags: {
|
|
blockStart: '{%',
|
|
blockEnd: '%}',
|
|
variableStart: '{{',
|
|
variableEnd: '}}',
|
|
commentStart: '{###',
|
|
commentEnd: '###}'
|
|
}
|
|
}
|
|
);
|
|
}
|
|
|
|
|
|
module.exports = TemplatingEngine;
|