]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/php-template.js
Initial commit.
[flow-web.git] / static / highlight / languages / php-template.js
1 /*! `php-template` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: PHP Template
8 Requires: xml.js, php.js
9 Author: Josh Goebel <hello@joshgoebel.com>
10 Website: https://www.php.net
11 Category: common
12 */
13
14 function phpTemplate(hljs) {
15 return {
16 name: "PHP template",
17 subLanguage: 'xml',
18 contains: [
19 {
20 begin: /<\?(php|=)?/,
21 end: /\?>/,
22 subLanguage: 'php',
23 contains: [
24 // We don't want the php closing tag ?> to close the PHP block when
25 // inside any of the following blocks:
26 {
27 begin: '/\\*',
28 end: '\\*/',
29 skip: true
30 },
31 {
32 begin: 'b"',
33 end: '"',
34 skip: true
35 },
36 {
37 begin: 'b\'',
38 end: '\'',
39 skip: true
40 },
41 hljs.inherit(hljs.APOS_STRING_MODE, {
42 illegal: null,
43 className: null,
44 contains: null,
45 skip: true
46 }),
47 hljs.inherit(hljs.QUOTE_STRING_MODE, {
48 illegal: null,
49 className: null,
50 contains: null,
51 skip: true
52 })
53 ]
54 }
55 ]
56 };
57 }
58
59 return phpTemplate;
60
61 })();
62
63 hljs.registerLanguage('php-template', hljsGrammar);
64 })();