1 | var escape = require('./escape'),
|
2 | reEscape = require('./_reEscape'),
|
3 | reEvaluate = require('./_reEvaluate'),
|
4 | reInterpolate = require('./_reInterpolate');
|
5 |
|
6 | /**
|
7 | * By default, the template delimiters used by lodash are like those in
|
8 | * embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
9 | * following template settings to use alternative delimiters.
|
10 | *
|
11 | * @static
|
12 | * @memberOf _
|
13 | * @type {Object}
|
14 | */
|
15 | var templateSettings = {
|
16 |
|
17 | /**
|
18 | * Used to detect `data` property values to be HTML-escaped.
|
19 | *
|
20 | * @memberOf _.templateSettings
|
21 | * @type {RegExp}
|
22 | */
|
23 | 'escape': reEscape,
|
24 |
|
25 | /**
|
26 | * Used to detect code to be evaluated.
|
27 | *
|
28 | * @memberOf _.templateSettings
|
29 | * @type {RegExp}
|
30 | */
|
31 | 'evaluate': reEvaluate,
|
32 |
|
33 | /**
|
34 | * Used to detect `data` property values to inject.
|
35 | *
|
36 | * @memberOf _.templateSettings
|
37 | * @type {RegExp}
|
38 | */
|
39 | 'interpolate': reInterpolate,
|
40 |
|
41 | /**
|
42 | * Used to reference the data object in the template text.
|
43 | *
|
44 | * @memberOf _.templateSettings
|
45 | * @type {string}
|
46 | */
|
47 | 'variable': '',
|
48 |
|
49 | /**
|
50 | * Used to import variables into the compiled template.
|
51 | *
|
52 | * @memberOf _.templateSettings
|
53 | * @type {Object}
|
54 | */
|
55 | 'imports': {
|
56 |
|
57 | /**
|
58 | * A reference to the `lodash` function.
|
59 | *
|
60 | * @memberOf _.templateSettings.imports
|
61 | * @type {Function}
|
62 | */
|
63 | '_': { 'escape': escape }
|
64 | }
|
65 | };
|
66 |
|
67 | module.exports = templateSettings;
|