main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
618 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | (function (Prism) {
|
---|
| 2 |
|
---|
| 3 | Prism.languages.ejs = {
|
---|
| 4 | 'delimiter': {
|
---|
| 5 | pattern: /^<%[-_=]?|[-_]?%>$/,
|
---|
| 6 | alias: 'punctuation'
|
---|
| 7 | },
|
---|
| 8 | 'comment': /^#[\s\S]*/,
|
---|
| 9 | 'language-javascript': {
|
---|
| 10 | pattern: /[\s\S]+/,
|
---|
| 11 | inside: Prism.languages.javascript
|
---|
| 12 | }
|
---|
| 13 | };
|
---|
| 14 |
|
---|
| 15 | Prism.hooks.add('before-tokenize', function (env) {
|
---|
| 16 | var ejsPattern = /<%(?!%)[\s\S]+?%>/g;
|
---|
| 17 | Prism.languages['markup-templating'].buildPlaceholders(env, 'ejs', ejsPattern);
|
---|
| 18 | });
|
---|
| 19 |
|
---|
| 20 | Prism.hooks.add('after-tokenize', function (env) {
|
---|
| 21 | Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
|
---|
| 22 | });
|
---|
| 23 |
|
---|
| 24 | Prism.languages.eta = Prism.languages.ejs;
|
---|
| 25 |
|
---|
| 26 | }(Prism));
|
---|
Note:
See
TracBrowser
for help on using the repository browser.