code_rippa 0.0.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile.lock +36 -0
- data/LICENSE +2 -2
- data/README.md +18 -1
- data/bin/code_rippa +15 -16
- data/code_rippa.gemspec +12 -10
- data/lib/code_rippa.rb +69 -51
- data/lib/code_rippa/syntax/actionscript.syntax +52 -52
- data/lib/code_rippa/syntax/active4d.syntax +226 -180
- data/lib/code_rippa/syntax/active4d_html.syntax +163 -173
- data/lib/code_rippa/syntax/active4d_ini.syntax +34 -27
- data/lib/code_rippa/syntax/active4d_library.syntax +8 -15
- data/lib/code_rippa/syntax/ada.syntax +19 -18
- data/lib/code_rippa/syntax/antlr.syntax +85 -85
- data/lib/code_rippa/syntax/apache.syntax +103 -109
- data/lib/code_rippa/syntax/applescript.syntax +244 -229
- data/lib/code_rippa/syntax/asp.syntax +41 -36
- data/lib/code_rippa/syntax/asp_vb.net.syntax +77 -72
- data/lib/code_rippa/syntax/bibtex.syntax +88 -90
- data/lib/code_rippa/syntax/blog_html.syntax +17 -29
- data/lib/code_rippa/syntax/blog_markdown.syntax +17 -27
- data/lib/code_rippa/syntax/blog_text.syntax +15 -15
- data/lib/code_rippa/syntax/blog_textile.syntax +15 -15
- data/lib/code_rippa/syntax/build.syntax +27 -27
- data/lib/code_rippa/syntax/bulletin_board.syntax +159 -172
- data/lib/code_rippa/syntax/c.syntax +31 -34
- data/lib/code_rippa/syntax/cake.syntax +27 -27
- data/lib/code_rippa/syntax/camlp4.syntax +23 -23
- data/lib/code_rippa/syntax/cm.syntax +19 -18
- data/lib/code_rippa/syntax/coffeescript.syntax +134 -181
- data/lib/code_rippa/syntax/coldfusion.syntax +51 -60
- data/lib/code_rippa/syntax/context_free.syntax +106 -106
- data/lib/code_rippa/syntax/cs.syntax +31 -34
- data/lib/code_rippa/syntax/css.syntax +112 -112
- data/lib/code_rippa/syntax/css_experimental.syntax +1006 -1004
- data/lib/code_rippa/syntax/csv.syntax +40 -44
- data/lib/code_rippa/syntax/d.syntax +80 -84
- data/lib/code_rippa/syntax/diff.syntax +46 -45
- data/lib/code_rippa/syntax/dokuwiki.syntax +118 -119
- data/lib/code_rippa/syntax/dot.syntax +26 -26
- data/lib/code_rippa/syntax/doxygen.syntax +26 -26
- data/lib/code_rippa/syntax/dylan.syntax +35 -35
- data/lib/code_rippa/syntax/eiffel.syntax +39 -42
- data/lib/code_rippa/syntax/erlang.syntax +514 -511
- data/lib/code_rippa/syntax/f-script.syntax +44 -44
- data/lib/code_rippa/syntax/fortran.syntax +80 -76
- data/lib/code_rippa/syntax/fxscript.syntax +78 -77
- data/lib/code_rippa/syntax/greasemonkey.syntax +20 -20
- data/lib/code_rippa/syntax/gri.syntax +47 -47
- data/lib/code_rippa/syntax/groovy.syntax +105 -114
- data/lib/code_rippa/syntax/gtd.syntax +10 -10
- data/lib/code_rippa/syntax/gtdalt.syntax +83 -83
- data/lib/code_rippa/syntax/haml.syntax +50 -50
- data/lib/code_rippa/syntax/haskell.syntax +47 -47
- data/lib/code_rippa/syntax/html-asp.syntax +15 -15
- data/lib/code_rippa/syntax/html_django.syntax +15 -14
- data/lib/code_rippa/syntax/html_for_asp.net.syntax +232 -245
- data/lib/code_rippa/syntax/html_mason.syntax +75 -74
- data/lib/code_rippa/syntax/html_rails.syntax +17 -27
- data/lib/code_rippa/syntax/html_tcl.syntax +13 -13
- data/lib/code_rippa/syntax/icalendar.syntax +15 -15
- data/lib/code_rippa/syntax/inform.syntax +26 -26
- data/lib/code_rippa/syntax/ini.syntax +30 -30
- data/lib/code_rippa/syntax/installer_distribution_script.syntax +49 -49
- data/lib/code_rippa/syntax/io.syntax +49 -46
- data/lib/code_rippa/syntax/java.syntax +117 -126
- data/lib/code_rippa/syntax/javaproperties.syntax +13 -12
- data/lib/code_rippa/syntax/javascript.syntax +141 -141
- data/lib/code_rippa/syntax/javascript_+_prototype.syntax +42 -41
- data/lib/code_rippa/syntax/javascript_+_prototype_bracketed.syntax +92 -91
- data/lib/code_rippa/syntax/jquery_javascript.syntax +64 -64
- data/lib/code_rippa/syntax/json.syntax +39 -39
- data/lib/code_rippa/syntax/languagedefinition.syntax +373 -453
- data/lib/code_rippa/syntax/lexflex.syntax +136 -136
- data/lib/code_rippa/syntax/lighttpd.syntax +31 -31
- data/lib/code_rippa/syntax/lilypond.syntax +246 -337
- data/lib/code_rippa/syntax/lisp.syntax +32 -32
- data/lib/code_rippa/syntax/literate_haskell.syntax +12 -12
- data/lib/code_rippa/syntax/logo.syntax +13 -14
- data/lib/code_rippa/syntax/logtalk.syntax +81 -81
- data/lib/code_rippa/syntax/lua.syntax +50 -48
- data/lib/code_rippa/syntax/m.syntax +78 -78
- data/lib/code_rippa/syntax/macports_portfile.syntax +98 -97
- data/lib/code_rippa/syntax/makefile.syntax +19 -19
- data/lib/code_rippa/syntax/man.syntax +9 -9
- data/lib/code_rippa/syntax/mediawiki.syntax +311 -401
- data/lib/code_rippa/syntax/mips.syntax +34 -34
- data/lib/code_rippa/syntax/mod_perl.syntax +25 -31
- data/lib/code_rippa/syntax/modula-3.syntax +24 -24
- data/lib/code_rippa/syntax/moinmoin.syntax +102 -102
- data/lib/code_rippa/syntax/mootools.syntax +283 -300
- data/lib/code_rippa/syntax/movable_type.syntax +91 -90
- data/lib/code_rippa/syntax/multimarkdown.syntax +19 -30
- data/lib/code_rippa/syntax/objective-c++.syntax +6 -10
- data/lib/code_rippa/syntax/objective-c.syntax +134 -138
- data/lib/code_rippa/syntax/ocaml.syntax +455 -453
- data/lib/code_rippa/syntax/ocamllex.syntax +94 -93
- data/lib/code_rippa/syntax/ocamlyacc.syntax +98 -98
- data/lib/code_rippa/syntax/opengl.syntax +6 -6
- data/lib/code_rippa/syntax/pascal.syntax +43 -42
- data/lib/code_rippa/syntax/perl.syntax +612 -615
- data/lib/code_rippa/syntax/plain_text.syntax +17 -20
- data/lib/code_rippa/syntax/postscript.syntax +71 -69
- data/lib/code_rippa/syntax/processing.syntax +60 -60
- data/lib/code_rippa/syntax/prolog.syntax +17 -20
- data/lib/code_rippa/syntax/property_list.syntax +338 -359
- data/lib/code_rippa/syntax/python.syntax +487 -509
- data/lib/code_rippa/syntax/python_django.syntax +9 -10
- data/lib/code_rippa/syntax/qmake_project.syntax +67 -67
- data/lib/code_rippa/syntax/qt_c++.syntax +12 -15
- data/lib/code_rippa/syntax/quake3_config.syntax +18 -17
- data/lib/code_rippa/syntax/r.syntax +42 -42
- data/lib/code_rippa/syntax/r_console.syntax +7 -8
- data/lib/code_rippa/syntax/ragel.syntax +109 -115
- data/lib/code_rippa/syntax/rd_r_documentation.syntax +53 -53
- data/lib/code_rippa/syntax/regexp.syntax +26 -26
- data/lib/code_rippa/syntax/release_notes.syntax +46 -26
- data/lib/code_rippa/syntax/remind.syntax +146 -146
- data/lib/code_rippa/syntax/restructuredtext.syntax +132 -131
- data/lib/code_rippa/syntax/rez.syntax +46 -45
- data/lib/code_rippa/syntax/ruby.syntax +533 -601
- data/lib/code_rippa/syntax/ruby_experimental.syntax +82 -100
- data/lib/code_rippa/syntax/ruby_on_rails.syntax +56 -68
- data/lib/code_rippa/syntax/s5.syntax +35 -51
- data/lib/code_rippa/syntax/scheme.syntax +162 -260
- data/lib/code_rippa/syntax/scilab.syntax +18 -18
- data/lib/code_rippa/syntax/setext.syntax +82 -82
- data/lib/code_rippa/syntax/shell-unix-generic.syntax +227 -226
- data/lib/code_rippa/syntax/slate.syntax +91 -91
- data/lib/code_rippa/syntax/sql.syntax +137 -139
- data/lib/code_rippa/syntax/sql_rails.syntax +8 -8
- data/lib/code_rippa/syntax/ssh-config.syntax +17 -17
- data/lib/code_rippa/syntax/standard_ml.syntax +67 -69
- data/lib/code_rippa/syntax/strings_file.syntax +20 -23
- data/lib/code_rippa/syntax/subversion_commit_message.syntax +20 -20
- data/lib/code_rippa/syntax/sweave.syntax +45 -45
- data/lib/code_rippa/syntax/swig.syntax +34 -33
- data/lib/code_rippa/syntax/tcl.syntax +87 -86
- data/lib/code_rippa/syntax/template_toolkit.syntax +67 -65
- data/lib/code_rippa/syntax/textile.syntax +111 -145
- data/lib/code_rippa/syntax/tsv.syntax +31 -33
- data/lib/code_rippa/syntax/twiki.syntax +141 -141
- data/lib/code_rippa/syntax/txt2tags.syntax +39 -38
- data/lib/code_rippa/syntax/vectorscript.syntax +31 -31
- data/lib/code_rippa/syntax/xhtml_1.0.syntax +2297 -2296
- data/lib/code_rippa/syntax/xml.syntax +95 -95
- data/lib/code_rippa/syntax/xml_strict.syntax +49 -50
- data/lib/code_rippa/syntax/xsl.syntax +31 -31
- data/lib/code_rippa/syntax/yaml.syntax +86 -86
- data/lib/code_rippa/syntax/yaml_converter.rb +37 -0
- data/lib/code_rippa/syntax/yui_javascript.syntax +88 -88
- data/lib/code_rippa/version.rb +2 -2
- data/test/fixtures/hello.rb +5 -3
- data/test/test_private_methods.rb +40 -40
- data/test/test_public_methods.rb +9 -18
- metadata +61 -63
@@ -1,36 +1,36 @@
|
|
1
|
-
---
|
1
|
+
---
|
2
2
|
name: Makefile
|
3
|
-
fileTypes:
|
3
|
+
fileTypes:
|
4
4
|
- GNUmakefile
|
5
5
|
- makefile
|
6
6
|
- Makefile
|
7
7
|
- OCamlMakefile
|
8
8
|
scopeName: source.makefile
|
9
9
|
uuid: FF1825E8-6B1C-11D9-B883-000D93589AF6
|
10
|
-
patterns:
|
10
|
+
patterns:
|
11
11
|
- name: variable.other.makefile
|
12
|
-
begin: ^(
|
13
|
-
end: $
|
14
|
-
patterns:
|
15
|
-
- match:
|
12
|
+
begin: "^(\\w|[-_])+\\s*\\??="
|
13
|
+
end: "$"
|
14
|
+
patterns:
|
15
|
+
- match: "\\\\\\n"
|
16
16
|
- name: string.interpolated.backtick.makefile
|
17
|
-
begin: `
|
18
|
-
end: `
|
19
|
-
patterns:
|
17
|
+
begin: "`"
|
18
|
+
end: "`"
|
19
|
+
patterns:
|
20
20
|
- include: source.shell
|
21
21
|
- name: comment.line.number-sign.makefile
|
22
22
|
begin: "#"
|
23
|
-
beginCaptures:
|
24
|
-
|
23
|
+
beginCaptures:
|
24
|
+
'0':
|
25
25
|
name: punctuation.definition.comment.makefile
|
26
|
-
end:
|
27
|
-
patterns:
|
26
|
+
end: "$\\n?"
|
27
|
+
patterns:
|
28
28
|
- name: punctuation.separator.continuation.makefile
|
29
|
-
match: (
|
29
|
+
match: "(?<!\\\\)\\\\$\\n"
|
30
30
|
- name: keyword.control.makefile
|
31
|
-
match: ^(
|
31
|
+
match: "^(\\s*)\\b(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)\\b"
|
32
32
|
- name: meta.function.makefile
|
33
|
-
captures:
|
34
|
-
|
33
|
+
captures:
|
34
|
+
'1':
|
35
35
|
name: entity.name.function.makefile
|
36
|
-
match: ^([
|
36
|
+
match: "^([^\\t ]+:(?!\\=))\\s*.*"
|
@@ -1,17 +1,17 @@
|
|
1
|
-
---
|
1
|
+
---
|
2
2
|
name: Man
|
3
|
-
fileTypes:
|
3
|
+
fileTypes:
|
4
4
|
- man
|
5
5
|
scopeName: text.man
|
6
6
|
uuid: E8BAC30A-16BF-498D-941D-73FBAED37891
|
7
|
-
foldingStartMarker: ^[A-Z](?:(
|
8
|
-
patterns:
|
7
|
+
foldingStartMarker: "^[A-Z](?:(?:\\S+\\s\\S+)+|\\S+)$"
|
8
|
+
patterns:
|
9
9
|
- name: markup.heading.man
|
10
|
-
match: ^[A-Z](?:(
|
10
|
+
match: "^[A-Z](?:(?:\\S+\\s\\S+)+|\\S+)$"
|
11
11
|
- name: markup.underline.link.man
|
12
|
-
match: ((https?|ftp|file|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])
|
12
|
+
match: "((https?|ftp|file|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])"
|
13
13
|
- name: markup.underline.link.internal.man
|
14
|
-
match: ([
|
14
|
+
match: "([\\w\\.]+\\(\\d[a-z]?\\))"
|
15
15
|
- name: meta.foldingStopMarker.man
|
16
|
-
match: ^_{2,}$
|
17
|
-
foldingStopMarker: ^_{2,}$
|
16
|
+
match: "^_{2,}$"
|
17
|
+
foldingStopMarker: "^_{2,}$"
|
@@ -1,567 +1,477 @@
|
|
1
|
-
---
|
1
|
+
---
|
2
2
|
name: Mediawiki
|
3
|
-
fileTypes:
|
3
|
+
fileTypes:
|
4
4
|
- mediawiki
|
5
5
|
- wikipedia
|
6
6
|
- wiki
|
7
7
|
scopeName: text.html.mediawiki
|
8
|
-
repository:
|
9
|
-
comments:
|
10
|
-
patterns:
|
8
|
+
repository:
|
9
|
+
comments:
|
10
|
+
patterns:
|
11
11
|
- name: comment.block.html.mediawiki
|
12
|
-
begin: <!--
|
13
|
-
end:
|
14
|
-
patterns:
|
12
|
+
begin: "<!--"
|
13
|
+
end: "--\\s*>"
|
14
|
+
patterns:
|
15
15
|
- name: invalid.illegal.bad-comments-or-CDATA.html.mediawiki
|
16
|
-
match: --
|
17
|
-
inline:
|
18
|
-
patterns:
|
19
|
-
- captures:
|
20
|
-
|
16
|
+
match: "--"
|
17
|
+
inline:
|
18
|
+
patterns:
|
19
|
+
- captures:
|
20
|
+
'1':
|
21
21
|
name: constant.other.date-time.mediawiki
|
22
|
-
|
22
|
+
'2':
|
23
23
|
name: invalid.illegal.too-many-tildes.mediawiki
|
24
|
-
match: (~~~~~)(~{0,2})(?!~)
|
24
|
+
match: "(~~~~~)(~{0,2})(?!~)"
|
25
25
|
- name: constant.other.signature.mediawiki
|
26
|
-
match: ~~~~?
|
26
|
+
match: "~~~~?"
|
27
27
|
comment: 3 ~s for sig, 4 for sig + timestamp
|
28
28
|
- include: "#link"
|
29
29
|
- include: "#style"
|
30
30
|
- include: "#template"
|
31
31
|
- include: "#block_html"
|
32
32
|
- include: "#comments"
|
33
|
-
template:
|
34
|
-
patterns:
|
33
|
+
template:
|
34
|
+
patterns:
|
35
35
|
- name: meta.template-parameter.mediawiki
|
36
|
-
captures:
|
37
|
-
|
36
|
+
captures:
|
37
|
+
'1':
|
38
38
|
name: variable.parameter.template.numeric.mediawiki
|
39
39
|
match: "{{{[ ]*([0-9]+)[ ]*}}}"
|
40
40
|
- name: meta.template-parameter.mediawiki
|
41
|
-
captures:
|
42
|
-
|
41
|
+
captures:
|
42
|
+
'1':
|
43
43
|
name: variable.parameter.template.named.mediawiki
|
44
44
|
match: "{{{[ ]*(.*?)[ ]*}}}"
|
45
45
|
- name: meta.template.parser-function.mediawiki
|
46
|
-
endCaptures:
|
47
|
-
|
46
|
+
endCaptures:
|
47
|
+
'1':
|
48
48
|
name: punctuation.fix_this_later.template.mediawiki
|
49
|
-
begin: ({{)(?=[ ]*#)
|
50
|
-
beginCaptures:
|
51
|
-
|
49
|
+
begin: "({{)(?=[ ]*#)"
|
50
|
+
beginCaptures:
|
51
|
+
'1':
|
52
52
|
name: punctuation.fix_this_later.template.mediawiki
|
53
|
-
|
53
|
+
'2':
|
54
54
|
name: meta.function-call.template.mediawiki
|
55
|
-
end: (}})
|
56
|
-
patterns:
|
55
|
+
end: "(}})"
|
56
|
+
patterns:
|
57
57
|
- include: "#inline"
|
58
|
-
comment: "\n\
|
59
|
-
\t\t\t\t\t\tWhy oh why did mediawiki have to add these??\n\
|
60
|
-
\t\t\t\t\t"
|
58
|
+
comment: "\n\t\t\t\t\t\tWhy oh why did mediawiki have to add these??\n\t\t\t\t\t"
|
61
59
|
- name: meta.template.mediawiki
|
62
|
-
endCaptures:
|
63
|
-
|
60
|
+
endCaptures:
|
61
|
+
'1':
|
64
62
|
name: punctuation.fix_this_later.template.mediawiki
|
65
|
-
begin: ({{)([^{}
|
66
|
-
beginCaptures:
|
67
|
-
|
63
|
+
begin: "({{)([^{}\\|]+)?"
|
64
|
+
beginCaptures:
|
65
|
+
'1':
|
68
66
|
name: punctuation.fix_this_later.template.mediawiki
|
69
|
-
|
67
|
+
'2':
|
70
68
|
name: meta.function-call.template.mediawiki
|
71
|
-
end: (}})
|
72
|
-
patterns:
|
69
|
+
end: "(}})"
|
70
|
+
patterns:
|
73
71
|
- include: "#comments"
|
74
|
-
- begin: (
|
72
|
+
- begin: "(\\|)\\s*(=)"
|
75
73
|
contentName: comment.block.template-hack.mediawiki
|
76
|
-
beginCaptures:
|
77
|
-
|
74
|
+
beginCaptures:
|
75
|
+
'1':
|
78
76
|
name: punctuation.fix_this_later.pipe.mediawiki
|
79
|
-
|
77
|
+
'2':
|
80
78
|
name: punctuation.fix_this_later.equals-sign.mediawiki
|
81
|
-
end: (?=[|}])
|
82
|
-
- begin: (
|
79
|
+
end: "(?=[|}])"
|
80
|
+
- begin: "(\\|)(([^{}\\|=]+)(=))?"
|
83
81
|
contentName: meta.value.template.mediawiki
|
84
|
-
beginCaptures:
|
85
|
-
|
82
|
+
beginCaptures:
|
83
|
+
'1':
|
86
84
|
name: punctuation.fix_this_later.pipe.mediawiki
|
87
|
-
|
85
|
+
'2':
|
88
86
|
name: variable.parameter.template.mediawiki
|
89
|
-
|
87
|
+
'3':
|
90
88
|
name: punctuation.fix_this_later.equals-sign.mediawiki
|
91
|
-
end: (?=[|}])
|
92
|
-
patterns:
|
89
|
+
end: "(?=[|}])"
|
90
|
+
patterns:
|
93
91
|
- include: "#inline"
|
94
92
|
- name: punctuation.fix_this_later.pipe.mediawiki
|
95
|
-
match:
|
96
|
-
comment: "\n\
|
97
|
-
\t\t\t\t\t\
|
98
|
-
\t\t\t\t\t\
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
comment: "\n\
|
103
|
-
\t\t\t\tThis repository item covers templates and parser functions.\n\
|
104
|
-
\t\t\t"
|
105
|
-
entities:
|
106
|
-
patterns:
|
93
|
+
match: "\\|"
|
94
|
+
comment: "\n\t\t\t\t\t\tI am not sure I really like the scope of\n\t\t\t\t\t\tmeta.function-call
|
95
|
+
for templates, but it seems like\n\t\t\t\t\t\tthe closest thing to what a
|
96
|
+
template is really doing,\n\t\t\t\t\t\twith parameters, etc.\n\t\t\t\t\t"
|
97
|
+
comment: "\n\t\t\t\tThis repository item covers templates and parser functions.\n\t\t\t"
|
98
|
+
entities:
|
99
|
+
patterns:
|
107
100
|
- name: constant.character.entity.html.mediawiki
|
108
101
|
match: "&([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);"
|
109
102
|
- name: invalid.illegal.bad-ampersand.html.mediawiki
|
110
103
|
match: "&"
|
111
|
-
comment: "\n\
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
style_in_link:
|
116
|
-
patterns:
|
104
|
+
comment: "\n\t\t\t\tMediawiki supports Unicode, so these should not usually be\n\t\t\t\tnecessary,
|
105
|
+
but they do show up on pages from time to time.\n\t\t\t"
|
106
|
+
style_in_link:
|
107
|
+
patterns:
|
117
108
|
- name: markup.bold.mediawiki
|
118
109
|
begin: "'''"
|
119
110
|
end: "'''"
|
120
|
-
patterns:
|
111
|
+
patterns:
|
121
112
|
- include: "#style_in_link"
|
122
113
|
- name: markup.italic.mediawiki
|
123
114
|
begin: "''"
|
124
115
|
end: "''"
|
125
|
-
patterns:
|
116
|
+
patterns:
|
126
117
|
- include: "#style_in_link"
|
127
|
-
- captures:
|
128
|
-
|
118
|
+
- captures:
|
119
|
+
'1':
|
129
120
|
name: meta.tag.inline.bold.html.mediawiki
|
130
|
-
begin: (<(b|strong)>)
|
121
|
+
begin: "(<(b|strong)>)"
|
131
122
|
contentName: markup.bold.html.mediawiki
|
132
|
-
end: (
|
133
|
-
patterns:
|
123
|
+
end: "(</\\2>)"
|
124
|
+
patterns:
|
134
125
|
- include: "#style_in_link"
|
135
|
-
- captures:
|
136
|
-
|
126
|
+
- captures:
|
127
|
+
'1':
|
137
128
|
name: meta.tag.inline.italic.html.mediawiki
|
138
|
-
begin: (<(i|em)>)
|
129
|
+
begin: "(<(i|em)>)"
|
139
130
|
contentName: markup.italic.html.mediawiki
|
140
|
-
end: (
|
141
|
-
patterns:
|
131
|
+
end: "(</\\2>)"
|
132
|
+
patterns:
|
142
133
|
- include: "#style_in_link"
|
143
|
-
- captures:
|
144
|
-
|
134
|
+
- captures:
|
135
|
+
'1':
|
145
136
|
name: meta.tag.inline.strikethrough.html.mediawiki
|
146
|
-
begin: (<(s|strike)>)
|
137
|
+
begin: "(<(s|strike)>)"
|
147
138
|
contentName: markup.other.strikethrough.html.mediawiki
|
148
|
-
end: (
|
149
|
-
patterns:
|
139
|
+
end: "(</\\2>)"
|
140
|
+
patterns:
|
150
141
|
- include: "#style_in_link"
|
151
|
-
- captures:
|
152
|
-
|
142
|
+
- captures:
|
143
|
+
'1':
|
153
144
|
name: meta.tag.inline.underline.html.mediawiki
|
154
|
-
begin: (<(u)>)
|
145
|
+
begin: "(<(u)>)"
|
155
146
|
contentName: markup.underline.html.mediawiki
|
156
|
-
end: (
|
157
|
-
patterns:
|
147
|
+
end: "(</\\2>)"
|
148
|
+
patterns:
|
158
149
|
- include: "#style_in_link"
|
159
|
-
- captures:
|
160
|
-
|
150
|
+
- captures:
|
151
|
+
'1':
|
161
152
|
name: meta.tag.inline.raw.html.mediawiki
|
162
|
-
begin: (<(tt|code)>)
|
153
|
+
begin: "(<(tt|code)>)"
|
163
154
|
contentName: markup.raw.html.mediawiki
|
164
|
-
end: (
|
165
|
-
patterns:
|
155
|
+
end: "(</\\2>)"
|
156
|
+
patterns:
|
166
157
|
- include: "#style_in_link"
|
167
|
-
- captures:
|
168
|
-
|
158
|
+
- captures:
|
159
|
+
'1':
|
169
160
|
name: meta.tag.inline.any.html.mediawiki
|
170
|
-
begin: (<(big|small|sub|sup)>)
|
161
|
+
begin: "(<(big|small|sub|sup)>)"
|
171
162
|
contentName: markup.other.inline-styles.html.mediawiki
|
172
|
-
end: (
|
173
|
-
patterns:
|
163
|
+
end: "(</\\2>)"
|
164
|
+
patterns:
|
174
165
|
- include: "#style_in_link"
|
175
166
|
- include: "#comments"
|
176
|
-
block:
|
177
|
-
patterns:
|
167
|
+
block:
|
168
|
+
patterns:
|
178
169
|
- name: meta.redirect.mediawiki
|
179
|
-
begin:
|
180
|
-
beginCaptures:
|
181
|
-
|
170
|
+
begin: "^\\s*(?i)(#redirect)"
|
171
|
+
beginCaptures:
|
172
|
+
'1':
|
182
173
|
name: keyword.control.redirect.mediawiki
|
183
|
-
end:
|
184
|
-
patterns:
|
174
|
+
end: "\\n"
|
175
|
+
patterns:
|
185
176
|
- include: "#link"
|
186
177
|
- name: markup.heading.mediawiki
|
187
|
-
match:
|
178
|
+
match: "^=+\\s*$"
|
188
179
|
- name: markup.heading.mediawiki
|
189
|
-
begin: ^(=+)(
|
190
|
-
end:
|
191
|
-
patterns:
|
180
|
+
begin: "^(=+)(?=.*\\1\\s*$)"
|
181
|
+
end: "\\1\\s*$\\n?"
|
182
|
+
patterns:
|
192
183
|
- name: invalid.illegal.extra-equals-sign.mediawiki
|
193
|
-
match: (?<=^=|^==|^===|^====|^=====|^======)=+|=(
|
184
|
+
match: "(?<=^=|^==|^===|^====|^=====|^======)=+|=(?==*\\s*$)"
|
194
185
|
- include: "#inline"
|
195
|
-
comment: "\n\
|
196
|
-
\
|
197
|
-
\t\t\t\t
|
198
|
-
\t\t\t\t\t interior \xE2\x80\x9C=\xE2\x80\x9D marks will be treated as invalid.\n\
|
199
|
-
\t\t\t\t "
|
186
|
+
comment: "\n\t\t\t\t\t\tThis matches lines which begin and end with some\n\t\t\t\t\t
|
187
|
+
\ number of “=” marks. If they are mismatched, then\n\t\t\t\t\t interior
|
188
|
+
“=” marks will be treated as invalid.\n\t\t\t\t "
|
200
189
|
- name: meta.separator.mediawiki
|
201
|
-
match: ^-{4,}[
|
202
|
-
comment: "\n\
|
203
|
-
\t\t\t\t\t
|
204
|
-
\t\t\t\t\t\tline by themselves.\n\
|
205
|
-
\t\t\t\t\t"
|
190
|
+
match: "^-{4,}[ \\t]*($\\n)?"
|
191
|
+
comment: "\n\t\t\t\t\t\tA separator is made up of 4 or more -s alone on a\n\t\t\t\t\t\tline
|
192
|
+
by themselves.\n\t\t\t\t\t"
|
206
193
|
- name: markup.raw.block.mediawiki
|
207
|
-
begin: ^ (
|
208
|
-
end: ^(?=[^ ])
|
209
|
-
patterns:
|
194
|
+
begin: "^ (?=\\s*\\S)"
|
195
|
+
end: "^(?=[^ ])"
|
196
|
+
patterns:
|
210
197
|
- include: "#inline"
|
211
|
-
comment: "\n\
|
212
|
-
\t\t\t\t\t\
|
213
|
-
\t\t\t\t\t\thtml are still interpreted in MediaWiki, unlike in\n\
|
214
|
-
\t\t\t\t\t\tmediawiki.\n\
|
215
|
-
\t\t\t\t\t"
|
198
|
+
comment: "\n\t\t\t\t\t\tCode blocks start with one space. Wiki text and\n\t\t\t\t\t\thtml
|
199
|
+
are still interpreted in MediaWiki, unlike in\n\t\t\t\t\t\tmediawiki.\n\t\t\t\t\t"
|
216
200
|
- name: markup.list.mediawiki
|
217
|
-
begin: ^([#*:;])
|
218
|
-
end: ^(
|
219
|
-
patterns:
|
201
|
+
begin: "^([#*:;])"
|
202
|
+
end: "^(?!\\1)"
|
203
|
+
patterns:
|
220
204
|
- include: "#inline"
|
221
|
-
comment: "\n\
|
222
|
-
\t\t\t\t\t\
|
223
|
-
\t\t\t\t\t\
|
224
|
-
\t\t\t\t\t\
|
225
|
-
\t\t\t\t\t\
|
226
|
-
\t\t\t\t\t\t\n\
|
227
|
-
\t\t\t\t\t\
|
228
|
-
\
|
229
|
-
\t\t\t\t\t\t - definition lists (; :)\n\
|
230
|
-
\t\t\t\t\t\t - indented paragraphs, as used on talk pages (:)\n\
|
231
|
-
\t\t\t\t\t\t\n\
|
232
|
-
\t\t\t\t\t\tthis last one might not even be scoped as a list in\n\
|
233
|
-
\t\t\t\t\t\tthe ideal case. It is fine as a list for now,\n\
|
234
|
-
\t\t\t\t\t\thowever.\n\
|
235
|
-
\t\t\t\t\t"
|
205
|
+
comment: "\n\t\t\t\t\t\tThis is preliminary. Eventually it would be nice\n\t\t\t\t\t\tto
|
206
|
+
scope each type of list differently, and even to\n\t\t\t\t\t\tdo scopes of
|
207
|
+
nested lists. There are 4 main things\n\t\t\t\t\t\twhich will be scoped as
|
208
|
+
lists:\n\t\t\t\t\t\t\n\t\t\t\t\t\t - numbered lists (#)\n\t\t\t\t\t\t -
|
209
|
+
unnumbered lists (*)\n\t\t\t\t\t\t - definition lists (; :)\n\t\t\t\t\t\t
|
210
|
+
\ - indented paragraphs, as used on talk pages (:)\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis
|
211
|
+
last one might not even be scoped as a list in\n\t\t\t\t\t\tthe ideal case.
|
212
|
+
\ It is fine as a list for now,\n\t\t\t\t\t\thowever.\n\t\t\t\t\t"
|
236
213
|
- include: "#table"
|
237
214
|
- include: "#comments"
|
238
215
|
- name: meta.paragraph.mediawiki
|
239
|
-
begin: ^(?![
|
240
|
-
end: ^(
|
241
|
-
patterns:
|
216
|
+
begin: "^(?![\\t ;*#:=]|----|$)"
|
217
|
+
end: "^(?:\\s*$|(?=[;*#:=]|----))"
|
218
|
+
patterns:
|
242
219
|
- include: "#inline"
|
243
|
-
comment: "\n\
|
244
|
-
\t\t\t\t\t
|
245
|
-
|
246
|
-
|
247
|
-
table:
|
248
|
-
patterns:
|
220
|
+
comment: "\n\t\t\t\t\t\tAnything that is not a code block, list, header, etc.\n\t\t\t\t\t\tis
|
221
|
+
a paragraph.\n\t\t\t\t\t"
|
222
|
+
table:
|
223
|
+
patterns:
|
249
224
|
- name: markup.other.table.mediawiki
|
250
|
-
begin: ^{
|
251
|
-
end:
|
252
|
-
patterns:
|
225
|
+
begin: "^{\\|"
|
226
|
+
end: "^\\|}"
|
227
|
+
patterns:
|
253
228
|
- name: markup.other.table.row.mediawiki
|
254
|
-
begin:
|
255
|
-
end: ^(
|
256
|
-
patterns:
|
229
|
+
begin: "^\\|-"
|
230
|
+
end: "^(?=\\|-|\\|})"
|
231
|
+
patterns:
|
257
232
|
- include: "#inline"
|
258
|
-
comment: "\n\
|
259
|
-
\t\t\t\t\t\t\t\
|
260
|
-
\t\t\t\t\t\t\t
|
261
|
-
\t\t\t\t\t\t\t\tlike moving a whole row up/down, etc.\n\
|
262
|
-
\t\t\t\t\t\t\t"
|
233
|
+
comment: "\n\t\t\t\t\t\t\t\thopefully we can allow selection of a whole\n\t\t\t\t\t\t\t\ttable
|
234
|
+
row, and possibly later allow things\n\t\t\t\t\t\t\t\tlike moving a whole
|
235
|
+
row up/down, etc.\n\t\t\t\t\t\t\t"
|
263
236
|
- include: "#inline"
|
264
|
-
comment: "\n\
|
265
|
-
\t\t\t\t\t\
|
266
|
-
\t\t\t\t\t
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
- captures:
|
272
|
-
"1":
|
237
|
+
comment: "\n\t\t\t\t\t\twe are going to have to add the styling capabilities\n\t\t\t\t\t\tto
|
238
|
+
this section eventually. It is complicated,\n\t\t\t\t\t\tthough, so I am
|
239
|
+
putting it off.\n\t\t\t\t\t"
|
240
|
+
block_html:
|
241
|
+
patterns:
|
242
|
+
- captures:
|
243
|
+
'1':
|
273
244
|
name: meta.tag.inline.math.mediawiki
|
274
|
-
begin: (<math>)
|
245
|
+
begin: "(<math>)"
|
275
246
|
contentName: source.math.tex.embedded.mediawiki
|
276
|
-
end: (</math>)
|
277
|
-
patterns:
|
247
|
+
end: "(</math>)"
|
248
|
+
patterns:
|
278
249
|
- include: text.tex.math
|
279
|
-
- captures:
|
280
|
-
|
250
|
+
- captures:
|
251
|
+
'1':
|
281
252
|
name: meta.tag.inline.ref.mediawiki
|
282
|
-
begin: (<ref>)
|
253
|
+
begin: "(<ref>)"
|
283
254
|
contentName: meta.reference.content.mediawiki
|
284
|
-
end: (</ref>)
|
285
|
-
patterns:
|
255
|
+
end: "(</ref>)"
|
256
|
+
patterns:
|
286
257
|
- include: "#inline"
|
287
|
-
- captures:
|
288
|
-
|
258
|
+
- captures:
|
259
|
+
'1':
|
289
260
|
name: meta.tag.inline.ref.mediawiki
|
290
|
-
begin: (<gallery>)
|
261
|
+
begin: "(<gallery>)"
|
291
262
|
contentName: meta.gallery.mediawiki
|
292
|
-
end: (</gallery>)
|
293
|
-
patterns:
|
263
|
+
end: "(</gallery>)"
|
264
|
+
patterns:
|
294
265
|
- name: meta.item.gallery.mediawiki
|
295
|
-
begin: "(?x)\n\
|
296
|
-
\t\t\t\t\t\t\t\t
|
297
|
-
\t\t\t\t\t\t\t\t(
|
298
|
-
|
299
|
-
|
300
|
-
\t\t\t\t\t\t\t\t)?\n\
|
301
|
-
\t\t\t\t\t\t\t"
|
302
|
-
beginCaptures:
|
303
|
-
"6":
|
266
|
+
begin: "(?x)\n\t\t\t\t\t\t\t\t^(?!\\s*\\n)\t\t\t\t# not an empty line\n\t\t\t\t\t\t\t\t(
|
267
|
+
[ ]*(((i|I)mage)(:)) # spaces, image, colon\n\t\t\t\t\t\t\t\t ([^\\[\\]|]+)
|
268
|
+
\ # anything\n\t\t\t\t\t\t\t\t (?<!\\s)[ ]* # spaces\n\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t"
|
269
|
+
beginCaptures:
|
270
|
+
'6':
|
304
271
|
name: constant.other.wiki-link.image.mediawiki
|
305
|
-
|
272
|
+
'3':
|
306
273
|
name: constant.other.namespace.image.mediawiki
|
307
|
-
|
274
|
+
'5':
|
308
275
|
name: punctuation.fix_this_later.colon.mediawiki
|
309
|
-
end:
|
310
|
-
patterns:
|
311
|
-
- begin: ^(
|
276
|
+
end: "\\n"
|
277
|
+
patterns:
|
278
|
+
- begin: "^(?!\\|)|(\\|)"
|
312
279
|
contentName: string.other.title.gallery.mediawiki
|
313
|
-
beginCaptures:
|
314
|
-
|
280
|
+
beginCaptures:
|
281
|
+
'1':
|
315
282
|
name: punctuation.fix_this_later.pipe.mediawiki
|
316
|
-
end:
|
317
|
-
patterns:
|
283
|
+
end: "\\n|(?=\\|)"
|
284
|
+
patterns:
|
318
285
|
- include: "#inline"
|
319
286
|
- name: punctuation.fix_this_later.pipe.mediawiki
|
320
|
-
match:
|
321
|
-
comment: "\n\
|
322
|
-
\t\t\t\
|
323
|
-
\t\t\t\t\n\
|
324
|
-
\t\t\t\t *
|
325
|
-
|
326
|
-
|
327
|
-
\t\t\t\t * definition lists: dl, dt, dd\n\
|
328
|
-
\t\t\t\t * headers: h1, h2, h3, h4, h5, h6\n\
|
329
|
-
\t\t\t\t * br\n\
|
330
|
-
\t\t\t"
|
331
|
-
link:
|
332
|
-
patterns:
|
287
|
+
match: "\\|"
|
288
|
+
comment: "\n\t\t\t\tThe available block HTML tags supported are:\n\t\t\t\t\n\t\t\t\t
|
289
|
+
\ * blockquote, center, pre, div, hr, p\n\t\t\t\t * tables: table, th, tr,
|
290
|
+
td, caption\n\t\t\t\t * lists: ul, ol, li\n\t\t\t\t * definition lists: dl,
|
291
|
+
dt, dd\n\t\t\t\t * headers: h1, h2, h3, h4, h5, h6\n\t\t\t\t * br\n\t\t\t"
|
292
|
+
link:
|
293
|
+
patterns:
|
333
294
|
- name: meta.image.wiki.mediawiki
|
334
|
-
endCaptures:
|
335
|
-
|
295
|
+
endCaptures:
|
296
|
+
'2':
|
336
297
|
name: punctuation.fix_this_later.pipe.mediawiki
|
337
|
-
|
298
|
+
'3':
|
338
299
|
name: string.other.title.link.wiki-link.mediawiki
|
339
|
-
begin:
|
340
|
-
(
|
341
|
-
|
342
|
-
|
343
|
-
([^\[\]|]+) # anything
|
344
|
-
(?<!\s)[ ]* # spaces
|
345
|
-
)
|
346
|
-
)
|
300
|
+
begin: "(?x:\n\t\t\t\t\t\t(\\[\\[) # opening brackets\n\t\t\t\t\t\t
|
301
|
+
\ ( [ ]*(((i|I)mage)(:)) # spaces, image, colon\n\t\t\t\t\t\t ([^\\[\\]|]+)
|
302
|
+
\ # anything\n\t\t\t\t\t\t (?<!\\s)[ ]* #
|
303
|
+
spaces\n\t\t\t\t\t\t )\n\t\t\t\t\t)"
|
347
304
|
applyEndPatternLast: 1
|
348
|
-
beginCaptures:
|
349
|
-
|
305
|
+
beginCaptures:
|
306
|
+
'6':
|
350
307
|
name: punctuation.fix_this_later.colon.mediawiki
|
351
|
-
|
308
|
+
'7':
|
352
309
|
name: constant.other.wiki-link.image.mediawiki
|
353
|
-
|
310
|
+
'1':
|
354
311
|
name: punctuation.fix_this_later.brackets.mediwiki
|
355
|
-
|
312
|
+
'4':
|
356
313
|
name: constant.other.namespace.image.mediawiki
|
357
|
-
end:
|
358
|
-
(
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
patterns:
|
363
|
-
- captures:
|
364
|
-
"1":
|
314
|
+
end: "(?x:\n\t\t\t\t\t\t ((\\|)[ ]*( [^\\[\\]|]+ )[ ]*)? # pipe, spaces, anything,
|
315
|
+
spaces\n\t\t\t\t\t\t(\\]\\]) # closing brackets\n\t\t\t\t\t)"
|
316
|
+
patterns:
|
317
|
+
- captures:
|
318
|
+
'1':
|
365
319
|
name: punctuation.fix_this_later.pipe.mediawiki
|
366
|
-
|
320
|
+
'2':
|
367
321
|
name: keyword.control.image.formatting.mediawiki
|
368
|
-
|
322
|
+
'3':
|
369
323
|
name: keyword.control.image.alignment.mediawiki
|
370
|
-
|
324
|
+
'4':
|
371
325
|
name: constant.numeric.image.width.mediawiki
|
372
|
-
|
326
|
+
'5':
|
373
327
|
name: constant.other.unit.mediawiki
|
374
|
-
match: "(?x)\n\
|
375
|
-
\t\t\t\t\t\t\t\t(
|
376
|
-
\t\t\t\t\t\t\t
|
377
|
-
\t\t\t\t\t\t\t\t |(right|left|center|none)\n\
|
378
|
-
\t\t\t\t\t\t\t\t |([0-9]+)(px)\n\
|
379
|
-
\t\t\t\t\t\t\t\t)[ ]*\n\
|
380
|
-
\t\t\t\t\t\t\t"
|
328
|
+
match: "(?x)\n\t\t\t\t\t\t\t\t(\\|)[ ]*\n\t\t\t\t\t\t\t\t( (thumb|thumbnail|frame)\n\t\t\t\t\t\t\t\t
|
329
|
+
|(right|left|center|none)\n\t\t\t\t\t\t\t\t |([0-9]+)(px)\n\t\t\t\t\t\t\t\t)[
|
330
|
+
]*\n\t\t\t\t\t\t\t"
|
381
331
|
- name: punctuation.fix_this_later.pipe.mediawiki
|
382
|
-
match:
|
332
|
+
match: "\\|"
|
383
333
|
- include: "#style_in_link"
|
384
334
|
- name: meta.link.wiki.mediawiki
|
385
|
-
endCaptures:
|
386
|
-
|
335
|
+
endCaptures:
|
336
|
+
'2':
|
387
337
|
name: string.other.title.link.wiki-link.mediawiki
|
388
|
-
begin:
|
389
|
-
(?
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
)?
|
397
|
-
)
|
398
|
-
beginCaptures:
|
399
|
-
"7":
|
338
|
+
begin: "(?x:\n\t\t\t\t\t\t(\\[\\[) # opening brackets\n\t\t\t\t\t\t
|
339
|
+
\ (:)? # colon to suppress image or category?\n\t\t\t\t\t\t
|
340
|
+
\ ((\\s+):[^\\[\\]]*(?=\\]\\]))? # a colon after spaces is invalid\n\t\t\t\t\t\t
|
341
|
+
\ [ ]* # spaces\n\t\t\t\t\t\t ( (([^\\[\\]|]+)(:))?
|
342
|
+
\ # namespace\n\t\t\t\t\t\t ([^\\[\\]|]+)(?<!\\s)[ ]* # link name\n\t\t\t\t\t\t
|
343
|
+
\ )?\n\t\t\t\t\t)"
|
344
|
+
beginCaptures:
|
345
|
+
'7':
|
400
346
|
name: constant.other.namespace.mediawiki
|
401
|
-
|
347
|
+
'8':
|
402
348
|
name: punctuation.fix_this_later.colon.mediawiki
|
403
|
-
|
349
|
+
'9':
|
404
350
|
name: constant.other.wiki-link.mediawiki
|
405
|
-
|
351
|
+
'1':
|
406
352
|
name: punctuation.fix_this_later.brackets.mediawiki
|
407
|
-
|
353
|
+
'2':
|
408
354
|
name: keyword.operator.wiki-link.suppress-image-or-category.mediawiki
|
409
|
-
|
355
|
+
'4':
|
410
356
|
name: invalid.illegal.whitespace.mediawiki
|
411
|
-
end:
|
412
|
-
(
|
413
|
-
|
414
|
-
(\]\]) # closing brackets
|
415
|
-
)
|
416
|
-
patterns:
|
357
|
+
end: "(?x:\n\t\t\t\t\t\t (\\|[ ]*([^\\[\\]|]+)[ ]*)? # pipe, spaces, anything,
|
358
|
+
spaces\n\t\t\t\t\t\t(\\]\\]) # closing brackets\n\t\t\t\t\t)"
|
359
|
+
patterns:
|
417
360
|
- include: "#style_in_link"
|
418
361
|
- name: meta.link.inline.external.mediawiki
|
419
|
-
begin:
|
362
|
+
begin: "\\[(\\S+)\\s*(?=[^\\]]*\\])"
|
420
363
|
contentName: string.other.title.link.external.mediawiki
|
421
|
-
beginCaptures:
|
422
|
-
|
364
|
+
beginCaptures:
|
365
|
+
'1':
|
423
366
|
name: markup.underline.link.external.mediawiki
|
424
|
-
end:
|
425
|
-
patterns:
|
367
|
+
end: "\\]"
|
368
|
+
patterns:
|
426
369
|
- include: "#style_in_link"
|
427
370
|
- name: markup.underline.link.external.mediawiki
|
428
|
-
match: ((https?|ftp|file)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])
|
429
|
-
style:
|
430
|
-
patterns:
|
371
|
+
match: "((https?|ftp|file)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])"
|
372
|
+
style:
|
373
|
+
patterns:
|
431
374
|
- name: markup.bold.mediawiki
|
432
375
|
begin: "'''"
|
433
376
|
end: "'''"
|
434
|
-
patterns:
|
377
|
+
patterns:
|
435
378
|
- include: "#inline"
|
436
379
|
- name: markup.italic.mediawiki
|
437
380
|
begin: "''"
|
438
381
|
end: "''(?!'[^'])"
|
439
|
-
patterns:
|
382
|
+
patterns:
|
440
383
|
- include: "#inline"
|
441
|
-
- captures:
|
442
|
-
|
384
|
+
- captures:
|
385
|
+
'1':
|
443
386
|
name: meta.tag.inline.bold.html.mediawiki
|
444
|
-
begin: (<(b|strong)>)
|
387
|
+
begin: "(<(b|strong)>)"
|
445
388
|
contentName: markup.bold.html.mediawiki
|
446
|
-
end: (
|
447
|
-
patterns:
|
389
|
+
end: "(</\\2>)"
|
390
|
+
patterns:
|
448
391
|
- include: "#inline"
|
449
|
-
- captures:
|
450
|
-
|
392
|
+
- captures:
|
393
|
+
'1':
|
451
394
|
name: meta.tag.inline.italic.html.mediawiki
|
452
|
-
begin: (<(i|em)>)
|
395
|
+
begin: "(<(i|em)>)"
|
453
396
|
contentName: markup.italic.html.mediawiki
|
454
|
-
end: (
|
455
|
-
patterns:
|
397
|
+
end: "(</\\2>)"
|
398
|
+
patterns:
|
456
399
|
- include: "#inline"
|
457
|
-
- captures:
|
458
|
-
|
400
|
+
- captures:
|
401
|
+
'1':
|
459
402
|
name: meta.tag.inline.strikethrough.html.mediawiki
|
460
|
-
begin: (<(s|strike)>)
|
403
|
+
begin: "(<(s|strike)>)"
|
461
404
|
contentName: markup.other.strikethrough.html.mediawiki
|
462
|
-
end: (
|
463
|
-
patterns:
|
405
|
+
end: "(</\\2>)"
|
406
|
+
patterns:
|
464
407
|
- include: "#inline"
|
465
|
-
- captures:
|
466
|
-
|
408
|
+
- captures:
|
409
|
+
'1':
|
467
410
|
name: meta.tag.inline.underline.html.mediawiki
|
468
|
-
begin: (<(u)>)
|
411
|
+
begin: "(<(u)>)"
|
469
412
|
contentName: markup.underline.html.mediawiki
|
470
|
-
end: (
|
471
|
-
patterns:
|
413
|
+
end: "(</\\2>)"
|
414
|
+
patterns:
|
472
415
|
- include: "#inline"
|
473
|
-
- captures:
|
474
|
-
|
416
|
+
- captures:
|
417
|
+
'1':
|
475
418
|
name: meta.tag.inline.raw.html.mediawiki
|
476
|
-
begin: (<(tt|code)>)
|
419
|
+
begin: "(<(tt|code)>)"
|
477
420
|
contentName: markup.raw.html.mediawiki
|
478
|
-
end: (
|
479
|
-
patterns:
|
421
|
+
end: "(</\\2>)"
|
422
|
+
patterns:
|
480
423
|
- include: "#inline"
|
481
|
-
- captures:
|
482
|
-
|
424
|
+
- captures:
|
425
|
+
'1':
|
483
426
|
name: meta.tag.inline.any.html.mediawiki
|
484
|
-
begin: (<(big|small|sub|sup)>)
|
427
|
+
begin: "(<(big|small|sub|sup)>)"
|
485
428
|
contentName: markup.other.inline-styles.html.mediawiki
|
486
|
-
end: (
|
487
|
-
patterns:
|
429
|
+
end: "(</\\2>)"
|
430
|
+
patterns:
|
488
431
|
- include: "#inline"
|
489
|
-
comment: "\n\
|
490
|
-
\t\t\t\
|
491
|
-
\t\t\t\
|
492
|
-
\t\t\t\
|
493
|
-
\t\t\t\
|
494
|
-
\t\t\t\t\n\
|
495
|
-
\t\t\t\
|
496
|
-
\t\t\t\ttags can accept attributes in the tag opening, etc. The\n\
|
497
|
-
\t\t\t\tcurrent implementation is intended to be naive, but covering\n\
|
498
|
-
\t\t\t\tthe majority of uses in mediawiki code.\n\
|
499
|
-
\t\t\t\t\n\
|
500
|
-
\t\t\t\tWe also need to add mediawiki-specific tags:\n\
|
501
|
-
\t\t\t\t\n\
|
502
|
-
\t\t\t\t * nowiki, noinclude, includeonly\n\
|
503
|
-
\t\t\t\t\n\
|
504
|
-
\t\t\t"
|
432
|
+
comment: "\n\t\t\t\tTODO: We still need to add:\n\n\t\t\t\t * font\n\t\t\t\t
|
433
|
+
\ * ruby, rb, rp, rt\n\t\t\t\t * cite\n\t\t\t\t\n\t\t\t\tinline tags to this
|
434
|
+
section, and make sure that the other\n\t\t\t\ttags can accept attributes in
|
435
|
+
the tag opening, etc. The\n\t\t\t\tcurrent implementation is intended to be
|
436
|
+
naive, but covering\n\t\t\t\tthe majority of uses in mediawiki code.\n\t\t\t\t\n\t\t\t\tWe
|
437
|
+
also need to add mediawiki-specific tags:\n\t\t\t\t\n\t\t\t\t * nowiki, noinclude,
|
438
|
+
includeonly\n\t\t\t\t\n\t\t\t"
|
505
439
|
uuid: 6AF21ADF-316A-47D1-A8B6-1BB38637DE9A
|
506
|
-
foldingStartMarker: ^(=+)
|
507
|
-
patterns:
|
440
|
+
foldingStartMarker: "^(=+)"
|
441
|
+
patterns:
|
508
442
|
- include: "#block"
|
509
443
|
- include: "#inline"
|
510
|
-
foldingStopMarker: ^.*$(
|
511
|
-
keyEquivalent: ^~M
|
512
|
-
comment: "\n\
|
513
|
-
|
514
|
-
|
515
|
-
\t\
|
516
|
-
\t\t
|
517
|
-
\t\t
|
518
|
-
\t\t\n\
|
519
|
-
\
|
520
|
-
\t\t
|
521
|
-
|
522
|
-
|
523
|
-
\t\t
|
524
|
-
\t\t
|
525
|
-
|
526
|
-
\t\t
|
527
|
-
\t\t
|
528
|
-
\t\t
|
529
|
-
\
|
530
|
-
|
531
|
-
|
532
|
-
\t\
|
533
|
-
\
|
534
|
-
\t\t
|
535
|
-
\t\t
|
536
|
-
|
537
|
-
\t\t
|
538
|
-
\t\t
|
539
|
-
|
540
|
-
\t\t
|
541
|
-
\t\t
|
542
|
-
\t\t\n\
|
543
|
-
\t\t
|
544
|
-
\t\t worth trying to do\n\
|
545
|
-
\t\t10. Figure out a better scope for meta.function-call. Infininight\n\
|
546
|
-
\t\t suggests entity.name.function.call, to be paralleled by\n\
|
547
|
-
\t\t entity.name.function.definition. I am not completly sure I like\n\
|
548
|
-
\t\t that solution, but it is probably better than meta.function-call\n\
|
549
|
-
\t\t\n\
|
550
|
-
\t\t\n\
|
551
|
-
\t\tTODO items not closely related to the grammar:\n\
|
552
|
-
\t\t\n\
|
553
|
-
\t\t 2. Add a drop command for links/images, add keyboard shortcuts for\n\
|
554
|
-
\t\t them too\n\
|
555
|
-
\t\t 3. Make sure all the preference items are sorted out, for instance\n\
|
556
|
-
\t\t smart typing pairs, indent patterns, etc.\n\
|
557
|
-
\t\t 4. Commands to do bold/italic, and maybe things like big/small \n\
|
558
|
-
\t\t 5. \n\
|
559
|
-
\t\t\n\
|
560
|
-
\t\tFINISHED:\n\
|
561
|
-
\t\t 2. Add support for LaTeX math mode inside of <math></math> tags.\n\
|
562
|
-
\t\t 1. Add a command for new list item. This one is trivial\n\
|
563
|
-
\t\t 6. Get the symbol list working on headings. Trivial.\n\
|
564
|
-
\t\t 8. <gallery></gallery> tag. This one adds some complication, but\n\
|
565
|
-
\t\t is worth supporting.\n\
|
566
|
-
\t\t \n\
|
567
|
-
\t"
|
444
|
+
foldingStopMarker: "^.*$(?=\\n(=+)|(?!\\n))"
|
445
|
+
keyEquivalent: "^~M"
|
446
|
+
comment: "\n\t\tThis language grammar tries to handle Mediawiki syntax. Mediawiki\n\t\tsyntax
|
447
|
+
is a mess. This grammar will likely never quite work right.\n\t\tThis is unsurprising
|
448
|
+
as Mediawiki itself has never quite worked right.\n\t\t\n\t\t\t\t--Jacob\n\t\t\n\t\tTODO:
|
449
|
+
lots of fixes still to do:\n\t\t\n\t\t 1. Add a bunch of HTML tags. See the #block
|
450
|
+
and #style sections.\n\t\t 3. Correctly scope all the parser functions and their
|
451
|
+
contents.\n\t\t This on will be complicated, as there are several: expr, if,
|
452
|
+
etc.\n\t\t 4. This is probably the biggest one: get all the lists to scope\n\t\t
|
453
|
+
\ correctly by type of list. Right now we just scope every list\n\t\t as a
|
454
|
+
list, and do not worry about what happens beyond that.\n\t\t Eventually we want
|
455
|
+
to do numbered and unnumbered separately, etc.\n\t\t 5. Get some kind of folding
|
456
|
+
by heading. Maybe it should just fold\n\t\t to the next header, no matter which
|
457
|
+
level it is. Then we can\n\t\t make a contents just by folding everything. Not
|
458
|
+
completely sure\n\t\t\tthis is possible with current TM folding.\n\t\t 7. Make sure
|
459
|
+
that illegal things are correctly scoped illegal.\n\t\t This is non-trivial,
|
460
|
+
and has several parts\n\t\t \n\t\t - Bold/italic are based on brain-dead
|
461
|
+
heuristics. I want to\n\t\t be stricter than Mediawiki on this one. Also,
|
462
|
+
we should\n\t\t scope as illegal when for instance a new heading starts\n\t\t
|
463
|
+
\ before an italic has been closed.\n\t\t - Templates... these will be
|
464
|
+
pretty tough to do, as they can\n\t\t be so flexible.\n\t\t - \n\t\t\n\t\t
|
465
|
+
9. <timeline></timeline> tag. I am really not sure this one is\n\t\t worth trying
|
466
|
+
to do\n\t\t10. Figure out a better scope for meta.function-call. Infininight\n\t\t
|
467
|
+
\ suggests entity.name.function.call, to be paralleled by\n\t\t entity.name.function.definition.
|
468
|
+
\ I am not completly sure I like\n\t\t that solution, but it is probably better
|
469
|
+
than meta.function-call\n\t\t\n\t\t\n\t\tTODO items not closely related to the grammar:\n\t\t\n\t\t
|
470
|
+
2. Add a drop command for links/images, add keyboard shortcuts for\n\t\t them
|
471
|
+
too\n\t\t 3. Make sure all the preference items are sorted out, for instance\n\t\t
|
472
|
+
\ smart typing pairs, indent patterns, etc.\n\t\t 4. Commands to do bold/italic,
|
473
|
+
and maybe things like big/small \n\t\t 5. \n\t\t\n\t\tFINISHED:\n\t\t 2. Add support
|
474
|
+
for LaTeX math mode inside of <math></math> tags.\n\t\t 1. Add a command for new
|
475
|
+
list item. This one is trivial\n\t\t 6. Get the symbol list working on headings.
|
476
|
+
\ Trivial.\n\t\t 8. <gallery></gallery> tag. This one adds some complication, but\n\t\t
|
477
|
+
\ is worth supporting.\n\t\t \n\t"
|