forked from atom/language-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml.cson
105 lines (105 loc) · 2.44 KB
/
html.cson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# This grammar file is responsible for including the actual PHP grammar
# by capturing <?php ?> tags
'scopeName': 'text.html.php'
'name': 'PHP'
'fileTypes': [
'aw'
'ctp'
'inc'
'install'
'module'
'php'
'php_cs'
'php3'
'php4'
'php5'
'phpt'
'phtml'
'profile'
]
'firstLineMatch': '''(?x)
# Hashbang
^\\#!.*(?:\\s|\\/)
php\\d?
(?:$|\\s)
|
# Modeline
(?i:
# Emacs
-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)
php
(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-
|
# Vim
(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=
(?:php|phtml)
(?=\\s|:|$)
)
|
# Regular opening PHP tags
^\\s*<\\?(?i:php|=|\\s|$)
'''
'foldingStartMarker': '(/\\*|\\{\\s*$|<<<HTML)'
'foldingStopMarker': '(\\*/|^\\s*\\}|^HTML;)'
'injections':
'text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js.embedded.html - (meta.embedded.block.php | meta.embedded.line.php))':
'patterns': [
{
'include': '#php-tag'
}
]
'patterns': [
{
'begin': '\\A#!'
'beginCaptures':
'0':
'name': 'punctuation.definition.comment.php'
'end': '$'
'name': 'comment.line.shebang.php'
}
{
'include': 'text.html.basic'
}
]
'repository':
'php-tag':
'patterns': [
{
'begin': '<\\?(?i:php|=)?(?![^?]*\\?>)'
'beginCaptures':
'0':
'name': 'punctuation.section.embedded.begin.php'
'end': '(\\?)>'
'endCaptures':
'0':
'name': 'punctuation.section.embedded.end.php'
'1':
'name': 'source.php'
'name': 'meta.embedded.block.php'
'contentName': 'source.php'
'patterns': [
{
'include': 'source.php'
}
]
}
{
'begin': '<\\?(?i:php|=)?'
'beginCaptures':
'0':
'name': 'punctuation.section.embedded.begin.php'
'end': '(\\?)>'
'endCaptures':
'0':
'name': 'punctuation.section.embedded.end.php'
'1':
'name': 'source.php'
'name': 'meta.embedded.line.php'
'contentName': 'source.php'
'patterns': [
{
'include': 'source.php'
}
]
}
]