wikilint 2.29.1 → 2.29.2
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/bin/config.js
CHANGED
|
@@ -68,7 +68,7 @@ const parseCommentAndExt = (wikitext, config, accum, includeOnly) => {
|
|
|
68
68
|
wikitext = wikitext.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu, m => {
|
|
69
69
|
stack.push(m);
|
|
70
70
|
return `\0${stack.length - 1}\x7F`;
|
|
71
|
-
}).replace(/<translate( nowrap)?>([\s\S]
|
|
71
|
+
}).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu, (_, p1, p2) => {
|
|
72
72
|
const l = accum.length;
|
|
73
73
|
// @ts-expect-error abstract class
|
|
74
74
|
new translate_1.TranslateToken(p1, p2 && (0, string_1.restore)(p2, stack), newConfig, accum);
|
package/dist/src/converter.js
CHANGED
|
@@ -76,8 +76,7 @@ let ConverterToken = (() => {
|
|
|
76
76
|
const [firstRule] = rules, hasColon = firstRule.includes(':'),
|
|
77
77
|
// @ts-expect-error abstract class
|
|
78
78
|
firstRuleToken = new converterRule_1.ConverterRuleToken(firstRule, hasColon, config, accum);
|
|
79
|
-
if (hasColon
|
|
80
|
-
|| !hasColon && rules.length === 2 && !(0, string_1.removeComment)(rules[1]).trim()) {
|
|
79
|
+
if (hasColon ? firstRuleToken.length === 1 : rules.length === 2 && !(0, string_1.removeComment)(rules[1]).trim()) {
|
|
81
80
|
this.insertAt(
|
|
82
81
|
// @ts-expect-error abstract class
|
|
83
82
|
new converterRule_1.ConverterRuleToken(rules.join(';'), false, config, accum));
|
package/dist/src/transclude.js
CHANGED
|
@@ -200,8 +200,7 @@ let TranscludeToken = (() => {
|
|
|
200
200
|
return false;
|
|
201
201
|
}
|
|
202
202
|
const magicWord = lcModifier.slice(0, -1).toLowerCase(), isRaw = raw.includes(magicWord), isSubst = subst.includes(magicWord);
|
|
203
|
-
if (this.#raw
|
|
204
|
-
|| !this.#raw && (isSubst || !modifier)
|
|
203
|
+
if ((this.#raw ? isRaw : isSubst || !modifier)
|
|
205
204
|
|| (debug_1.Shadow.running || this.length > 1) && (isRaw || isSubst || !modifier)) {
|
|
206
205
|
this.setAttribute('modifier', modifier);
|
|
207
206
|
this.#raw = isRaw;
|