wikiparser-node 1.14.1 → 1.15.1

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.
Files changed (49) hide show
  1. package/README.md +17 -1
  2. package/bundle/bundle.es7.js +27 -27
  3. package/bundle/bundle.min.js +27 -27
  4. package/config/.schema.json +72 -29
  5. package/config/default.json +331 -241
  6. package/config/enwiki.json +206 -929
  7. package/config/llwiki.json +289 -241
  8. package/config/minimum.json +21 -11
  9. package/config/moegirl.json +290 -251
  10. package/config/zhwiki.json +330 -706
  11. package/coverage/badge.svg +1 -0
  12. package/dist/addon/table.js +1 -1
  13. package/dist/addon/token.js +18 -14
  14. package/dist/addon/transclude.js +5 -1
  15. package/dist/base.d.ts +4 -3
  16. package/dist/index.js +18 -6
  17. package/dist/lib/element.js +4 -0
  18. package/dist/lib/node.js +8 -3
  19. package/dist/lib/range.js +13 -6
  20. package/dist/lib/ranges.js +5 -2
  21. package/dist/lib/text.js +7 -6
  22. package/dist/lib/title.js +1 -0
  23. package/dist/mixin/attributesParent.d.ts +1 -1
  24. package/dist/parser/braces.js +1 -0
  25. package/dist/parser/externalLinks.js +1 -1
  26. package/dist/parser/hrAndDoubleUnderscore.js +1 -1
  27. package/dist/parser/magicLinks.js +1 -1
  28. package/dist/parser/selector.js +10 -2
  29. package/dist/src/atom.js +1 -0
  30. package/dist/src/attribute.d.ts +6 -4
  31. package/dist/src/attributes.js +3 -4
  32. package/dist/src/link/base.js +1 -0
  33. package/dist/src/link/file.js +3 -0
  34. package/dist/src/link/index.js +5 -6
  35. package/dist/src/link/redirectTarget.d.ts +2 -3
  36. package/dist/src/link/redirectTarget.js +1 -2
  37. package/dist/src/nowiki/comment.js +1 -0
  38. package/dist/src/onlyinclude.js +1 -0
  39. package/dist/src/table/index.d.ts +0 -3
  40. package/dist/src/table/index.js +2 -1
  41. package/dist/src/table/trBase.js +3 -2
  42. package/dist/src/transclude.js +5 -10
  43. package/dist/util/debug.js +10 -2
  44. package/dist/util/diff.js +5 -0
  45. package/dist/util/string.js +12 -1
  46. package/extensions/dist/base.js +1 -1
  47. package/extensions/dist/test-page.js +89 -0
  48. package/extensions/es7/base.js +1 -1
  49. package/package.json +12 -6
@@ -39,9 +39,32 @@
39
39
  "file",
40
40
  "category"
41
41
  ],
42
- "additionalProperties": {
43
- "type": "integer"
44
- }
42
+ "patternProperties": {
43
+ "^[^A-Z]*$": {
44
+ "type": "integer"
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "variable": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string",
53
+ "pattern": "^[^#A-Z]+$"
54
+ },
55
+ "allOf": [
56
+ {
57
+ "contains": {
58
+ "const": "!"
59
+ }
60
+ },
61
+ {
62
+ "contains": {
63
+ "const": "="
64
+ }
65
+ }
66
+ ],
67
+ "minItems": 2
45
68
  },
46
69
  "parserFunction": {
47
70
  "type": "array",
@@ -49,41 +72,44 @@
49
72
  {
50
73
  "description": "case-insensitive parser functions",
51
74
  "type": "object",
52
- "additionalProperties": {
53
- "type": "string"
54
- }
75
+ "patternProperties": {
76
+ "^[^A-Z]+$": {
77
+ "type": "string",
78
+ "pattern": "^[^#A-Z]+$"
79
+ }
80
+ },
81
+ "additionalProperties": false
55
82
  },
56
83
  {
57
84
  "description": "case-sensitive parser functions",
58
- "type": "array",
59
- "allOf": [
60
- {
61
- "contains": {
62
- "const": "!"
63
- }
85
+ "type": "object",
86
+ "properties": {
87
+ "!": {
88
+ "const": "!"
64
89
  },
65
- {
66
- "contains": {
67
- "const": "="
68
- }
90
+ "=": {
91
+ "const": "="
69
92
  }
70
- ],
71
- "items": {
72
- "type": "string"
93
+ },
94
+ "additionalProperties": {
95
+ "type": "string",
96
+ "pattern": "^[^#A-Z]+$"
73
97
  }
74
98
  },
75
99
  {
76
100
  "description": "msg and raw",
77
101
  "type": "array",
78
102
  "items": {
79
- "type": "string"
103
+ "type": "string",
104
+ "pattern": "^[^A-Z]+$"
80
105
  }
81
106
  },
82
107
  {
83
108
  "description": "subst and safesubst",
84
109
  "type": "array",
85
110
  "items": {
86
- "type": "string"
111
+ "type": "string",
112
+ "pattern": "^[^A-Z]+$"
87
113
  }
88
114
  }
89
115
  ],
@@ -98,7 +124,8 @@
98
124
  "description": "case-insensitive behavior switches",
99
125
  "type": "array",
100
126
  "items": {
101
- "type": "string"
127
+ "type": "string",
128
+ "pattern": "^[^A-Z]+$"
102
129
  }
103
130
  },
104
131
  {
@@ -111,13 +138,24 @@
111
138
  {
112
139
  "description": "case-insensitive behavior switches",
113
140
  "type": "object",
141
+ "patternProperties": {
142
+ "^[^A-Z]+$": {
143
+ "type": "string",
144
+ "pattern": "^[^A-Z]+$"
145
+ }
146
+ },
147
+ "additionalProperties": false
148
+ },
149
+ {
150
+ "description": "case-sensitive behavior switches",
151
+ "type": "object",
114
152
  "additionalProperties": {
115
153
  "type": "string"
116
154
  }
117
155
  }
118
156
  ],
119
157
  "minItems": 2,
120
- "maxItems": 3
158
+ "maxItems": 4
121
159
  },
122
160
  "protocol": {
123
161
  "description": "external link protocols",
@@ -127,23 +165,27 @@
127
165
  "interwiki": {
128
166
  "type": "array",
129
167
  "items": {
130
- "type": "string"
168
+ "type": "string",
169
+ "pattern": "^[^A-Z]+$"
131
170
  }
132
171
  },
133
172
  "img": {
134
173
  "description": "image-related magic words",
135
174
  "type": "object",
136
- "additionalProperties": {
137
- "type": "string",
138
- "pattern": "^[-a-z]+$"
139
- }
175
+ "patternProperties": {
176
+ "^[^A-Z]+$": {
177
+ "type": "string",
178
+ "pattern": "^[-a-z]+$"
179
+ }
180
+ },
181
+ "additionalProperties": false
140
182
  },
141
183
  "redirection": {
142
184
  "description": "magic words for redirection",
143
185
  "type": "array",
144
186
  "items": {
145
187
  "type": "string",
146
- "pattern": "^#.+$"
188
+ "pattern": "^#[^A-Z]+$"
147
189
  }
148
190
  },
149
191
  "variants": {
@@ -191,6 +233,7 @@
191
233
  "html",
192
234
  "namespaces",
193
235
  "nsid",
236
+ "variable",
194
237
  "parserFunction",
195
238
  "doubleUnderscore",
196
239
  "protocol",