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:
925 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 | var refractorMarkupTemplating = require('./markup-templating.js')
|
---|
3 | module.exports = ejs
|
---|
4 | ejs.displayName = 'ejs'
|
---|
5 | ejs.aliases = ['eta']
|
---|
6 | function ejs(Prism) {
|
---|
7 | Prism.register(refractorMarkupTemplating)
|
---|
8 | ;(function (Prism) {
|
---|
9 | Prism.languages.ejs = {
|
---|
10 | delimiter: {
|
---|
11 | pattern: /^<%[-_=]?|[-_]?%>$/,
|
---|
12 | alias: 'punctuation'
|
---|
13 | },
|
---|
14 | comment: /^#[\s\S]*/,
|
---|
15 | 'language-javascript': {
|
---|
16 | pattern: /[\s\S]+/,
|
---|
17 | inside: Prism.languages.javascript
|
---|
18 | }
|
---|
19 | }
|
---|
20 | Prism.hooks.add('before-tokenize', function (env) {
|
---|
21 | var ejsPattern = /<%(?!%)[\s\S]+?%>/g
|
---|
22 | Prism.languages['markup-templating'].buildPlaceholders(
|
---|
23 | env,
|
---|
24 | 'ejs',
|
---|
25 | ejsPattern
|
---|
26 | )
|
---|
27 | })
|
---|
28 | Prism.hooks.add('after-tokenize', function (env) {
|
---|
29 | Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs')
|
---|
30 | })
|
---|
31 | Prism.languages.eta = Prism.languages.ejs
|
---|
32 | })(Prism)
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.