wikiparser-node 1.5.5 → 1.5.6
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/lib/title.js +0 -6
- package/dist/src/extLink.js +4 -2
- package/dist/src/table/td.js +1 -1
- package/package.json +1 -1
package/dist/lib/title.js
CHANGED
|
@@ -103,12 +103,6 @@ class Title {
|
|
|
103
103
|
}
|
|
104
104
|
catch { }
|
|
105
105
|
}
|
|
106
|
-
else if (fragment.includes('.')) {
|
|
107
|
-
try {
|
|
108
|
-
fragment = decodeURIComponent(fragment.replace(/\./gu, '%'));
|
|
109
|
-
}
|
|
110
|
-
catch { }
|
|
111
|
-
}
|
|
112
106
|
this.fragment = fragment;
|
|
113
107
|
title = title.slice(0, i).trim();
|
|
114
108
|
}
|
package/dist/src/extLink.js
CHANGED
|
@@ -154,10 +154,12 @@ let ExtLinkToken = (() => {
|
|
|
154
154
|
}
|
|
155
155
|
/** 修正空白字符 */
|
|
156
156
|
#correct() {
|
|
157
|
+
const { lastChild, length } = this, { firstChild } = lastChild;
|
|
157
158
|
if (!this.#space
|
|
158
|
-
&&
|
|
159
|
+
&& length > 1
|
|
160
|
+
&& (firstChild?.type === 'text' || firstChild?.type === 'converter')
|
|
159
161
|
// 都替换成`<`肯定不对,但无妨
|
|
160
|
-
&& /^[^[\]<>"
|
|
162
|
+
&& /^[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]/u.test(lastChild.text().replace(/&[lg]t;/u, '<'))) {
|
|
161
163
|
this.#space = ' ';
|
|
162
164
|
}
|
|
163
165
|
}
|
package/dist/src/table/td.js
CHANGED
|
@@ -145,7 +145,7 @@ let TdToken = (() => {
|
|
|
145
145
|
result.escape ||= esc;
|
|
146
146
|
result.correction = str.includes('\n') && debug_1.Shadow.run(() => {
|
|
147
147
|
const config = this.getAttribute('config'), include = this.getAttribute('include');
|
|
148
|
-
return String(new index_2.Token(str, config).parseOnce(0, include).parseOnce()).includes('\n');
|
|
148
|
+
return String(new index_2.Token(str, config).parseOnce(0, include).parseOnce().parseOnce()).includes('\n');
|
|
149
149
|
});
|
|
150
150
|
if (subtype === 'th' && result.subtype !== 'th') {
|
|
151
151
|
result.subtype = 'th';
|