wikilint 2.7.0 → 2.8.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/index.d.ts +1 -0
- package/dist/util/string.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare interface Parser extends ParserBase {
|
|
|
16
16
|
parse(wikitext: string, include?: boolean, maxStage?: number, config?: Config): Token;
|
|
17
17
|
}
|
|
18
18
|
declare const Parser: Parser;
|
|
19
|
+
// @ts-expect-error mixed export styles
|
|
19
20
|
export = Parser;
|
|
20
21
|
export type { Config, LintError };
|
|
21
22
|
export type * from './internal';
|
package/dist/util/string.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.extUrlChar = `(?:${commonExtUrlChar}|\0\\d+[c!~]\x7F)*`;
|
|
|
11
11
|
*/
|
|
12
12
|
const factory = (regex, replace) => (str) => str.replace(regex, replace);
|
|
13
13
|
/** 清理解析专用的不可见字符 */
|
|
14
|
-
exports.tidy = factory(/[\0\x7F]
|
|
14
|
+
exports.tidy = factory(/[\0\x7F]|\r$/gmu, '');
|
|
15
15
|
/** remove half-parsed comment-like tokens */
|
|
16
16
|
exports.removeComment = factory(/\0\d+c\x7F/gu, '');
|
|
17
17
|
/** escape special chars for RegExp constructor */
|