main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /*
|
---|
2 | Language: PHP Template
|
---|
3 | Requires: xml.js, php.js
|
---|
4 | Author: Josh Goebel <hello@joshgoebel.com>
|
---|
5 | Website: https://www.php.net
|
---|
6 | Category: common
|
---|
7 | */
|
---|
8 |
|
---|
9 | function phpTemplate(hljs) {
|
---|
10 | return {
|
---|
11 | name: "PHP template",
|
---|
12 | subLanguage: 'xml',
|
---|
13 | contains: [
|
---|
14 | {
|
---|
15 | begin: /<\?(php|=)?/,
|
---|
16 | end: /\?>/,
|
---|
17 | subLanguage: 'php',
|
---|
18 | contains: [
|
---|
19 | // We don't want the php closing tag ?> to close the PHP block when
|
---|
20 | // inside any of the following blocks:
|
---|
21 | {
|
---|
22 | begin: '/\\*',
|
---|
23 | end: '\\*/',
|
---|
24 | skip: true
|
---|
25 | },
|
---|
26 | {
|
---|
27 | begin: 'b"',
|
---|
28 | end: '"',
|
---|
29 | skip: true
|
---|
30 | },
|
---|
31 | {
|
---|
32 | begin: 'b\'',
|
---|
33 | end: '\'',
|
---|
34 | skip: true
|
---|
35 | },
|
---|
36 | hljs.inherit(hljs.APOS_STRING_MODE, {
|
---|
37 | illegal: null,
|
---|
38 | className: null,
|
---|
39 | contains: null,
|
---|
40 | skip: true
|
---|
41 | }),
|
---|
42 | hljs.inherit(hljs.QUOTE_STRING_MODE, {
|
---|
43 | illegal: null,
|
---|
44 | className: null,
|
---|
45 | contains: null,
|
---|
46 | skip: true
|
---|
47 | })
|
---|
48 | ]
|
---|
49 | }
|
---|
50 | ]
|
---|
51 | };
|
---|
52 | }
|
---|
53 |
|
---|
54 | module.exports = phpTemplate;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.