@bhsd/codemirror-mediawiki 1.1.11 → 2.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.
- package/dist/main.js +1 -0
- package/mediawiki.css +34 -24
- package/package.json +25 -12
- package/config.json +0 -228
- package/mediawiki.js +0 -917
package/mediawiki.css
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
text-decoration: underline;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
.cm-mw-matching {
|
|
6
|
+
background-color: #ffd700;
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
/* miscellaneous */
|
|
6
10
|
.cm-mw-skipformatting {
|
|
7
11
|
background-color: #adf;
|
|
8
12
|
}
|
|
13
|
+
.cm-mw-indenting,
|
|
9
14
|
.cm-mw-list {
|
|
10
15
|
color: #08f;
|
|
11
16
|
font-weight: bold;
|
|
@@ -27,18 +32,12 @@
|
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
/* section title */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
line-height: 1.2em;
|
|
37
|
-
}
|
|
38
|
-
pre.cm-mw-section-3,
|
|
39
|
-
pre.cm-mw-section-4,
|
|
40
|
-
pre.cm-mw-section-5,
|
|
41
|
-
pre.cm-mw-section-6 {
|
|
35
|
+
.cm-mw-section-1,
|
|
36
|
+
.cm-mw-section-2,
|
|
37
|
+
.cm-mw-section-3,
|
|
38
|
+
.cm-mw-section-4,
|
|
39
|
+
.cm-mw-section-5,
|
|
40
|
+
.cm-mw-section-6 {
|
|
42
41
|
font-weight: bold;
|
|
43
42
|
}
|
|
44
43
|
.cm-mw-section-header {
|
|
@@ -47,7 +46,10 @@ pre.cm-mw-section-6 {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
/* template */
|
|
50
|
-
.cm-mw-template
|
|
49
|
+
.cm-mw-template {
|
|
50
|
+
color: #80c;
|
|
51
|
+
font-weight: normal;
|
|
52
|
+
}
|
|
51
53
|
.cm-mw-template-name-mnemonic {
|
|
52
54
|
font-weight: normal;
|
|
53
55
|
}
|
|
@@ -58,21 +60,24 @@ pre.cm-mw-section-6 {
|
|
|
58
60
|
font-weight: bold;
|
|
59
61
|
}
|
|
60
62
|
.cm-mw-template-argument-name {
|
|
61
|
-
color: #
|
|
62
|
-
font-weight:
|
|
63
|
+
color: #80c;
|
|
64
|
+
font-weight: bold;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
/* template variable */
|
|
66
68
|
.cm-mw-templatevariable {
|
|
67
|
-
color: #
|
|
69
|
+
color: #f50;
|
|
68
70
|
font-weight: normal;
|
|
69
71
|
}
|
|
70
72
|
.cm-mw-templatevariable-name,
|
|
71
|
-
.cm-mw-templatevariable-bracket,
|
|
72
73
|
.cm-mw-templatevariable-delimiter {
|
|
73
74
|
color: #f50;
|
|
74
75
|
font-weight: bold;
|
|
75
76
|
}
|
|
77
|
+
.cm-mw-templatevariable-bracket {
|
|
78
|
+
color: #f50;
|
|
79
|
+
font-weight: normal;
|
|
80
|
+
}
|
|
76
81
|
|
|
77
82
|
/* parser function */
|
|
78
83
|
.cm-mw-parserfunction {
|
|
@@ -100,6 +105,7 @@ pre.cm-mw-section-6 {
|
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
/* link */
|
|
108
|
+
.cm-mw-link,
|
|
103
109
|
.cm-mw-link-pagename,
|
|
104
110
|
.cm-mw-link-bracket,
|
|
105
111
|
.cm-mw-link-delimiter,
|
|
@@ -108,7 +114,6 @@ pre.cm-mw-section-6 {
|
|
|
108
114
|
color: #36c;
|
|
109
115
|
font-weight: normal;
|
|
110
116
|
}
|
|
111
|
-
.cm-mw-link,
|
|
112
117
|
.cm-mw-link-tosection {
|
|
113
118
|
color: #18e;
|
|
114
119
|
font-weight: normal;
|
|
@@ -126,7 +131,6 @@ pre.cm-mw-section-6 {
|
|
|
126
131
|
color: #e0e;
|
|
127
132
|
font-weight: bold;
|
|
128
133
|
}
|
|
129
|
-
.cm-mw-table-delimiter2,
|
|
130
134
|
.cm-mw-table-definition {
|
|
131
135
|
color: #e0e;
|
|
132
136
|
font-weight: normal;
|
|
@@ -137,7 +141,7 @@ pre.cm-mw-section-6 {
|
|
|
137
141
|
|
|
138
142
|
/* mnemonic */
|
|
139
143
|
.cm-mw-mnemonic {
|
|
140
|
-
color: #
|
|
144
|
+
color: #290;
|
|
141
145
|
}
|
|
142
146
|
|
|
143
147
|
/* backgrounds */
|
|
@@ -145,14 +149,14 @@ pre.cm-mw-section-6 {
|
|
|
145
149
|
.cm-mw-tag-nowiki {
|
|
146
150
|
background-color: rgba( 0, 0, 0, 0.04 );
|
|
147
151
|
}
|
|
148
|
-
.cm-mw-
|
|
149
|
-
background-color: rgba(
|
|
152
|
+
.cm-mw-exttag {
|
|
153
|
+
background-color: rgba( 119, 0, 170, 0.02 );
|
|
150
154
|
}
|
|
151
155
|
.cm-mw-template2-ground {
|
|
152
|
-
background-color: rgba( 170, 17, 17, 0.
|
|
156
|
+
background-color: rgba( 170, 17, 17, 0.04 );
|
|
153
157
|
}
|
|
154
158
|
.cm-mw-template3-ground {
|
|
155
|
-
background-color: rgba( 170, 17, 17, 0.
|
|
159
|
+
background-color: rgba( 170, 17, 17, 0.08 );
|
|
156
160
|
}
|
|
157
161
|
.cm-mw-template-ext-ground,
|
|
158
162
|
.cm-mw-ext-ground,
|
|
@@ -224,4 +228,10 @@ pre.cm-mw-section-6 {
|
|
|
224
228
|
}
|
|
225
229
|
.cm-mw-template3-ext3-link-ground {
|
|
226
230
|
background-color: rgba( 122, 9, 116, 0.24 );
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.cm-mw-matchingbracket {
|
|
234
|
+
background-color: #eee;
|
|
235
|
+
box-shadow: inset 0 0 1px 1px #999;
|
|
236
|
+
font-weight: bold;
|
|
227
237
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bhsd/codemirror-mediawiki",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Modified CodeMirror mode based on wikimedia/mediawiki-extensions-CodeMirror",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -11,23 +11,36 @@
|
|
|
11
11
|
"url": "https://github.com/bhsd-harry/codemirror-mediawiki/issues"
|
|
12
12
|
},
|
|
13
13
|
"license": "GPL-2.0",
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"/mediawiki.css",
|
|
18
|
-
"/mediawiki.js"
|
|
14
|
+
"files":[
|
|
15
|
+
"dist/main.js",
|
|
16
|
+
"mediawiki.css"
|
|
19
17
|
],
|
|
20
|
-
"browser": "/
|
|
18
|
+
"browser": "dist/main.js",
|
|
21
19
|
"repository": {
|
|
22
20
|
"type": "git",
|
|
23
21
|
"url": "git+https://github.com/bhsd-harry/codemirror-mediawiki.git"
|
|
24
22
|
},
|
|
25
23
|
"scripts": {
|
|
26
|
-
"
|
|
24
|
+
"build": "webpack",
|
|
25
|
+
"test": "eslint --cache ."
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": "20.9.0"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
31
|
+
"@codemirror/commands": "^6.2.5",
|
|
32
|
+
"@codemirror/language": "^6.9.3",
|
|
33
|
+
"@codemirror/search": "^6.5.4",
|
|
34
|
+
"@codemirror/state": "^6.2.1",
|
|
35
|
+
"@codemirror/view": "^6.18.1",
|
|
36
|
+
"@lezer/highlight": "^1.2.0",
|
|
37
|
+
"esbuild-loader": "^4.0.2",
|
|
38
|
+
"eslint": "^8.53.0",
|
|
39
|
+
"eslint-plugin-es-x": "^7.3.0",
|
|
40
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
41
|
+
"eslint-plugin-regexp": "^2.1.2",
|
|
42
|
+
"eslint-plugin-unicorn": "^49.0.0",
|
|
43
|
+
"webpack": "^5.89.0",
|
|
44
|
+
"webpack-cli": "^5.1.4"
|
|
32
45
|
}
|
|
33
|
-
}
|
|
46
|
+
}
|
package/config.json
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tagModes": {
|
|
3
|
-
"ref": "text/mediawiki",
|
|
4
|
-
"pre": "mw-tag-pre",
|
|
5
|
-
"nowiki": "mw-tag-nowiki"
|
|
6
|
-
},
|
|
7
|
-
"tags": {
|
|
8
|
-
"pre": true,
|
|
9
|
-
"nowiki": true,
|
|
10
|
-
"gallery": true,
|
|
11
|
-
"indicator": true,
|
|
12
|
-
"poem": true,
|
|
13
|
-
"ref": true,
|
|
14
|
-
"references": true,
|
|
15
|
-
"categorytree": true
|
|
16
|
-
},
|
|
17
|
-
"doubleUnderscore": [
|
|
18
|
-
{
|
|
19
|
-
"__notoc__": "notoc",
|
|
20
|
-
"__nogallery__": "nogallery",
|
|
21
|
-
"__forcetoc__": "forcetoc",
|
|
22
|
-
"__toc__": "toc",
|
|
23
|
-
"__noeditsection__": "noeditsection",
|
|
24
|
-
"__notitleconvert__": "notitleconvert",
|
|
25
|
-
"__notc__": "notitleconvert",
|
|
26
|
-
"__nocontentconvert__": "nocontentconvert",
|
|
27
|
-
"__nocc__": "nocontentconvert"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"__NEWSECTIONLINK__": "newsectionlink",
|
|
31
|
-
"__NONEWSECTIONLINK__": "nonewsectionlink",
|
|
32
|
-
"__HIDDENCAT__": "hiddencat",
|
|
33
|
-
"__EXPECTUNUSEDCATEGORY__": "expectunusedcategory",
|
|
34
|
-
"__INDEX__": "index",
|
|
35
|
-
"__NOINDEX__": "noindex",
|
|
36
|
-
"__STATICREDIRECT__": "staticredirect",
|
|
37
|
-
"__NOGLOBAL__": "noglobal",
|
|
38
|
-
"__EXPECTED_UNCONNECTED_PAGE__": "expectedUnconnectedPage"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"functionSynonyms": [
|
|
42
|
-
{
|
|
43
|
-
"ns": "ns",
|
|
44
|
-
"nse": "nse",
|
|
45
|
-
"urlencode": "urlencode",
|
|
46
|
-
"lcfirst": "lcfirst",
|
|
47
|
-
"ucfirst": "ucfirst",
|
|
48
|
-
"lc": "lc",
|
|
49
|
-
"uc": "uc",
|
|
50
|
-
"localurl": "localurl",
|
|
51
|
-
"localurle": "localurle",
|
|
52
|
-
"fullurl": "fullurl",
|
|
53
|
-
"fullurle": "fullurle",
|
|
54
|
-
"canonicalurl": "canonicalurl",
|
|
55
|
-
"canonicalurle": "canonicalurle",
|
|
56
|
-
"formatnum": "formatnum",
|
|
57
|
-
"grammar": "grammar",
|
|
58
|
-
"gender": "gender",
|
|
59
|
-
"plural": "plural",
|
|
60
|
-
"bidi": "bidi",
|
|
61
|
-
"#language": "language",
|
|
62
|
-
"padleft": "padleft",
|
|
63
|
-
"padright": "padright",
|
|
64
|
-
"anchorencode": "anchorencode",
|
|
65
|
-
"filepath": "filepath",
|
|
66
|
-
"pageid": "pageid",
|
|
67
|
-
"int": "int",
|
|
68
|
-
"#special": "special",
|
|
69
|
-
"#speciale": "speciale",
|
|
70
|
-
"#tag": "tag",
|
|
71
|
-
"#formatdate": "formatdate",
|
|
72
|
-
"#dateformat": "formatdate",
|
|
73
|
-
"#invoke": "invoke",
|
|
74
|
-
"#if": "if",
|
|
75
|
-
"#ifeq": "ifeq",
|
|
76
|
-
"#switch": "switch",
|
|
77
|
-
"#ifexist": "ifexist",
|
|
78
|
-
"#ifexpr": "ifexpr",
|
|
79
|
-
"#iferror": "iferror",
|
|
80
|
-
"#time": "time",
|
|
81
|
-
"#timel": "timel",
|
|
82
|
-
"#expr": "expr",
|
|
83
|
-
"#rel2abs": "rel2abs",
|
|
84
|
-
"#titleparts": "titleparts",
|
|
85
|
-
"#categorytree": "categorytree",
|
|
86
|
-
"articlepath": "articlepath",
|
|
87
|
-
"server": "server",
|
|
88
|
-
"servername": "servername",
|
|
89
|
-
"scriptpath": "scriptpath",
|
|
90
|
-
"stylepath": "stylepath",
|
|
91
|
-
"msg": "msg",
|
|
92
|
-
"raw": "raw",
|
|
93
|
-
"msgnw": "msgnw",
|
|
94
|
-
"subst": "subst",
|
|
95
|
-
"safesubst": "safesubst"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"NUMBEROFPAGES": "numberofpages",
|
|
99
|
-
"NUMBEROFUSERS": "numberofusers",
|
|
100
|
-
"NUMBEROFACTIVEUSERS": "numberofactiveusers",
|
|
101
|
-
"NUMBEROFARTICLES": "numberofarticles",
|
|
102
|
-
"NUMBEROFFILES": "numberoffiles",
|
|
103
|
-
"NUMBEROFADMINS": "numberofadmins",
|
|
104
|
-
"NUMBERINGROUP": "numberingroup",
|
|
105
|
-
"NUMINGROUP": "numberingroup",
|
|
106
|
-
"NUMBEROFEDITS": "numberofedits",
|
|
107
|
-
"DEFAULTSORT": "defaultsort",
|
|
108
|
-
"DEFAULTSORTKEY": "defaultsort",
|
|
109
|
-
"DEFAULTCATEGORYSORT": "defaultsort",
|
|
110
|
-
"PAGESINCATEGORY": "pagesincategory",
|
|
111
|
-
"PAGESINCAT": "pagesincategory",
|
|
112
|
-
"PAGESIZE": "pagesize",
|
|
113
|
-
"PROTECTIONLEVEL": "protectionlevel",
|
|
114
|
-
"PROTECTIONEXPIRY": "protectionexpiry",
|
|
115
|
-
"NAMESPACEE": "namespacee",
|
|
116
|
-
"NAMESPACENUMBER": "namespacenumber",
|
|
117
|
-
"TALKSPACE": "talkspace",
|
|
118
|
-
"TALKSPACEE": "talkspacee",
|
|
119
|
-
"SUBJECTSPACE": "subjectspace",
|
|
120
|
-
"ARTICLESPACE": "subjectspace",
|
|
121
|
-
"SUBJECTSPACEE": "subjectspacee",
|
|
122
|
-
"ARTICLESPACEE": "subjectspacee",
|
|
123
|
-
"PAGENAME": "pagename",
|
|
124
|
-
"PAGENAMEE": "pagenamee",
|
|
125
|
-
"FULLPAGENAME": "fullpagename",
|
|
126
|
-
"FULLPAGENAMEE": "fullpagenamee",
|
|
127
|
-
"ROOTPAGENAME": "rootpagename",
|
|
128
|
-
"ROOTPAGENAMEE": "rootpagenamee",
|
|
129
|
-
"BASEPAGENAME": "basepagename",
|
|
130
|
-
"BASEPAGENAMEE": "basepagenamee",
|
|
131
|
-
"SUBPAGENAME": "subpagename",
|
|
132
|
-
"SUBPAGENAMEE": "subpagenamee",
|
|
133
|
-
"TALKPAGENAME": "talkpagename",
|
|
134
|
-
"TALKPAGENAMEE": "talkpagenamee",
|
|
135
|
-
"SUBJECTPAGENAME": "subjectpagename",
|
|
136
|
-
"ARTICLEPAGENAME": "subjectpagename",
|
|
137
|
-
"SUBJECTPAGENAMEE": "subjectpagenamee",
|
|
138
|
-
"ARTICLEPAGENAMEE": "subjectpagenamee",
|
|
139
|
-
"REVISIONID": "revisionid",
|
|
140
|
-
"REVISIONDAY": "revisionday",
|
|
141
|
-
"REVISIONDAY2": "revisionday2",
|
|
142
|
-
"REVISIONMONTH": "revisionmonth",
|
|
143
|
-
"REVISIONMONTH1": "revisionmonth1",
|
|
144
|
-
"REVISIONYEAR": "revisionyear",
|
|
145
|
-
"REVISIONTIMESTAMP": "revisiontimestamp",
|
|
146
|
-
"REVISIONUSER": "revisionuser",
|
|
147
|
-
"CASCADINGSOURCES": "cascadingsources",
|
|
148
|
-
"NAMESPACE": "namespace",
|
|
149
|
-
"DISPLAYTITLE": "displaytitle",
|
|
150
|
-
"!": "!",
|
|
151
|
-
"CURRENTMONTH": "currentmonth",
|
|
152
|
-
"CURRENTMONTH2": "currentmonth",
|
|
153
|
-
"CURRENTMONTH1": "currentmonth1",
|
|
154
|
-
"CURRENTMONTHNAME": "currentmonthname",
|
|
155
|
-
"CURRENTMONTHNAMEGEN": "currentmonthnamegen",
|
|
156
|
-
"CURRENTMONTHABBREV": "currentmonthabbrev",
|
|
157
|
-
"CURRENTDAY": "currentday",
|
|
158
|
-
"CURRENTDAY2": "currentday2",
|
|
159
|
-
"CURRENTDAYNAME": "currentdayname",
|
|
160
|
-
"CURRENTYEAR": "currentyear",
|
|
161
|
-
"CURRENTTIME": "currenttime",
|
|
162
|
-
"CURRENTHOUR": "currenthour",
|
|
163
|
-
"LOCALMONTH": "localmonth",
|
|
164
|
-
"LOCALMONTH2": "localmonth",
|
|
165
|
-
"LOCALMONTH1": "localmonth1",
|
|
166
|
-
"LOCALMONTHNAME": "localmonthname",
|
|
167
|
-
"LOCALMONTHNAMEGEN": "localmonthnamegen",
|
|
168
|
-
"LOCALMONTHABBREV": "localmonthabbrev",
|
|
169
|
-
"LOCALDAY": "localday",
|
|
170
|
-
"LOCALDAY2": "localday2",
|
|
171
|
-
"LOCALDAYNAME": "localdayname",
|
|
172
|
-
"LOCALYEAR": "localyear",
|
|
173
|
-
"LOCALTIME": "localtime",
|
|
174
|
-
"LOCALHOUR": "localhour",
|
|
175
|
-
"SITENAME": "sitename",
|
|
176
|
-
"CURRENTWEEK": "currentweek",
|
|
177
|
-
"CURRENTDOW": "currentdow",
|
|
178
|
-
"LOCALWEEK": "localweek",
|
|
179
|
-
"LOCALDOW": "localdow",
|
|
180
|
-
"REVISIONSIZE": "revisionsize",
|
|
181
|
-
"CURRENTVERSION": "currentversion",
|
|
182
|
-
"CURRENTTIMESTAMP": "currenttimestamp",
|
|
183
|
-
"LOCALTIMESTAMP": "localtimestamp",
|
|
184
|
-
"CONTENTLANGUAGE": "contentlanguage",
|
|
185
|
-
"CONTENTLANG": "contentlanguage",
|
|
186
|
-
"PAGELANGUAGE": "pagelanguage"
|
|
187
|
-
}
|
|
188
|
-
],
|
|
189
|
-
"urlProtocols": "bitcoin\\:|ftp\\:\\/\\/|ftps\\:\\/\\/|geo\\:|git\\:\\/\\/|gopher\\:\\/\\/|http\\:\\/\\/|https\\:\\/\\/|irc\\:\\/\\/|ircs\\:\\/\\/|magnet\\:|mailto\\:|mms\\:\\/\\/|news\\:|nntp\\:\\/\\/|redis\\:\\/\\/|sftp\\:\\/\\/|sip\\:|sips\\:|sms\\:|ssh\\:\\/\\/|svn\\:\\/\\/|tel\\:|telnet\\:\\/\\/|urn\\:|worldwind\\:\\/\\/|xmpp\\:|\\/\\/",
|
|
190
|
-
"redirect": [
|
|
191
|
-
"#REDIRECT"
|
|
192
|
-
],
|
|
193
|
-
"img": {
|
|
194
|
-
"thumbnail": "img_thumbnail",
|
|
195
|
-
"thumb": "img_thumbnail",
|
|
196
|
-
"thumbnail=$1": "img_manualthumb",
|
|
197
|
-
"thumb=$1": "img_manualthumb",
|
|
198
|
-
"right": "img_right",
|
|
199
|
-
"left": "img_left",
|
|
200
|
-
"none": "img_none",
|
|
201
|
-
"$1px": "img_width",
|
|
202
|
-
"center": "img_center",
|
|
203
|
-
"centre": "img_center",
|
|
204
|
-
"framed": "img_framed",
|
|
205
|
-
"enframed": "img_framed",
|
|
206
|
-
"frame": "img_framed",
|
|
207
|
-
"frameless": "img_frameless",
|
|
208
|
-
"lang=$1": "img_lang",
|
|
209
|
-
"page=$1": "img_page",
|
|
210
|
-
"page $1": "img_page",
|
|
211
|
-
"upright": "img_upright",
|
|
212
|
-
"upright=$1": "img_upright",
|
|
213
|
-
"upright $1": "img_upright",
|
|
214
|
-
"border": "img_border",
|
|
215
|
-
"baseline": "img_baseline",
|
|
216
|
-
"sub": "img_sub",
|
|
217
|
-
"super": "img_super",
|
|
218
|
-
"sup": "img_super",
|
|
219
|
-
"top": "img_top",
|
|
220
|
-
"text-top": "img_text_top",
|
|
221
|
-
"middle": "img_middle",
|
|
222
|
-
"bottom": "img_bottom",
|
|
223
|
-
"text-bottom": "img_text_bottom",
|
|
224
|
-
"link=$1": "img_link",
|
|
225
|
-
"alt=$1": "img_alt",
|
|
226
|
-
"class=$1": "img_class"
|
|
227
|
-
}
|
|
228
|
-
}
|