-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrobots-txt.yaml-tmLanguage
More file actions
52 lines (45 loc) · 942 Bytes
/
robots-txt.yaml-tmLanguage
File metadata and controls
52 lines (45 loc) · 942 Bytes
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
name: robots.txt
scopeName: text.robots-txt
fileTypes:
- robots.txt
patterns:
- include: '#main'
repository:
main:
patterns:
- include: '#comment'
- include: '#directive'
- include: '#wildcard'
- include: '#uri'
- include: '#text'
- include: '#number'
# Comment line
comment:
name: comment.line.hash.robots-txt
begin: '#'
end: '$'
beginCaptures:
'0':
name: punctuation.definition.comment.robots-txt
# Directive
directive:
name: keyword.control.directive.robots-txt
begin: '^[A-Z][a-z-]*'
end: '\s*:'
# Wildcard
wildcard:
name: constant.character.wildcard.robots-txt
match: '\*'
# URI
uri:
name: string.unquoted.uri.robots-txt
begin: '(?:[a-z]+:)?\/'
end: '$'
# Text
text:
name: string.unquoted.text.robots-txt
match: '[A-Za-z-]+'
# Numbers
number:
name: constant.numeric.integer.robots-txt
match: '\d+'