source: node_modules/highlight.js/lib/languages/leaf.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[d24f17c]1/*
2Language: Leaf
3Author: Hale Chan <halechan@qq.com>
4Description: Based on the Leaf reference from https://vapor.github.io/documentation/guide/leaf.html.
5*/
6
7function leaf(hljs) {
8 return {
9 name: 'Leaf',
10 contains: [
11 {
12 className: 'function',
13 begin: '#+' + '[A-Za-z_0-9]*' + '\\(',
14 end: / \{/,
15 returnBegin: true,
16 excludeEnd: true,
17 contains: [
18 {
19 className: 'keyword',
20 begin: '#+'
21 },
22 {
23 className: 'title',
24 begin: '[A-Za-z_][A-Za-z_0-9]*'
25 },
26 {
27 className: 'params',
28 begin: '\\(',
29 end: '\\)',
30 endsParent: true,
31 contains: [
32 {
33 className: 'string',
34 begin: '"',
35 end: '"'
36 },
37 {
38 className: 'variable',
39 begin: '[A-Za-z_][A-Za-z_0-9]*'
40 }
41 ]
42 }
43 ]
44 }
45 ]
46 };
47}
48
49module.exports = leaf;
Note: See TracBrowser for help on using the repository browser.