|
8 | 8 | *
|
9 | 9 | */
|
10 | 10 |
|
| 11 | +/* |
| 12 | + * ENGINE SUPPORT LEVEL: |
| 13 | + * |
| 14 | + * Full. Partial calls and lineage hunting are supported. Handlebars does not |
| 15 | + * support the mustache-specific syntax extensions, style modifiers and pattern |
| 16 | + * parameters, because their use cases are addressed by the core Handlebars |
| 17 | + * feature set. |
| 18 | + * |
| 19 | + */ |
| 20 | + |
11 | 21 | (function () {
|
12 | 22 | "use strict";
|
13 | 23 |
|
|
23 | 33 | expandPartials: false,
|
24 | 34 |
|
25 | 35 | // regexes, stored here so they're only compiled once
|
26 |
| - // GTP warning: unchanged copypasta from mustache engine |
27 |
| - // findPartialsRE: /{{>\s*((?:\d+-[\w-]+\/)+(\d+-[\w-]+(\.\w+)?)|[A-Za-z0-9-]+)(\:[\w-]+)?(\(\s*\w+\s*:\s*(?:'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")\))?\s*}}/g, |
28 | 36 | findPartialsRE: /{{#?>\s*([\w-\/.]+)(?:.|\s+)*?}}/g,
|
29 |
| - findPartialsWithStyleModifiersRE: /{{>([ ])?([\w\-\.\/~]+)(?!\()(\:[A-Za-z0-9-_|]+)+(?:(| )\(.*)?([ ])?}}/g, |
30 |
| - findPartialsWithPatternParametersRE: /{{>([ ])?([\w\-\.\/~]+)(?:\:[A-Za-z0-9-_|]+)?(?:(| )\(.*)+([ ])?}}/g, |
31 | 37 | findListItemsRE: /({{#( )?)(list(I|i)tems.)(one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty)( )?}}/g,
|
32 | 38 |
|
33 | 39 | // render it
|
|
48 | 54 | var matches = pattern.template.match(this.findPartialsRE);
|
49 | 55 | return matches;
|
50 | 56 | },
|
51 |
| - findPartialsWithStyleModifiers: function(pattern) { |
52 |
| - var matches = pattern.template.match(this.findPartialsWithStyleModifiersRE); |
53 |
| - return matches; |
| 57 | + findPartialsWithStyleModifiers: function() { |
| 58 | + // TODO: make the call to this from oPattern objects conditional on their |
| 59 | + // being implemented here. |
| 60 | + return []; |
54 | 61 | },
|
55 | 62 | // returns any patterns that match {{> value(foo:"bar") }} or {{>
|
56 | 63 | // value:mod(foo:"bar") }} within the pattern
|
57 |
| - findPartialsWithPatternParameters: function(pattern) { |
58 |
| - var matches = pattern.template.match(this.findPartialsWithPatternParametersRE); |
59 |
| - return matches; |
| 64 | + findPartialsWithPatternParameters: function() { |
| 65 | + // TODO: make the call to this from oPattern objects conditional on their |
| 66 | + // being implemented here. |
| 67 | + return []; |
60 | 68 | },
|
61 | 69 | findListItems: function(pattern) {
|
62 | 70 | var matches = pattern.template.match(this.findListItemsRE);
|
|
0 commit comments