summaryrefslogtreecommitdiffstats
path: root/lib/templating/index.js
blob: 1031bdbfecaa960aa46a6e3044ec263dd339a174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;