wikiparser-node 1.1.0 → 1.1.1-b

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 (153) hide show
  1. package/bundle/bundle.min.js +36 -0
  2. package/config/llwiki.json +1 -35
  3. package/config/moegirl.json +1 -44
  4. package/config/zhwiki.json +1 -466
  5. package/extensions/dist/base.js +70 -0
  6. package/extensions/dist/editor.js +172 -0
  7. package/extensions/dist/highlight.js +39 -0
  8. package/extensions/dist/lint.js +48 -0
  9. package/extensions/editor.css +63 -0
  10. package/extensions/ui.css +119 -0
  11. package/package.json +23 -11
  12. package/config/.schema.json +0 -160
  13. package/dist/addon/table.d.ts +0 -6
  14. package/dist/addon/table.js +0 -559
  15. package/dist/bin/toc.js +0 -18
  16. package/dist/index.d.ts +0 -60
  17. package/dist/index.js +0 -210
  18. package/dist/internal.d.ts +0 -44
  19. package/dist/lib/element.d.ts +0 -155
  20. package/dist/lib/element.js +0 -655
  21. package/dist/lib/node.d.ts +0 -143
  22. package/dist/lib/node.js +0 -420
  23. package/dist/lib/range.d.ts +0 -104
  24. package/dist/lib/range.js +0 -386
  25. package/dist/lib/ranges.d.ts +0 -26
  26. package/dist/lib/ranges.js +0 -117
  27. package/dist/lib/text.d.ts +0 -63
  28. package/dist/lib/text.js +0 -218
  29. package/dist/lib/title.d.ts +0 -38
  30. package/dist/lib/title.js +0 -162
  31. package/dist/mixin/attributesParent.js +0 -94
  32. package/dist/mixin/fixed.js +0 -32
  33. package/dist/mixin/flagsParent.js +0 -70
  34. package/dist/mixin/hidden.js +0 -22
  35. package/dist/mixin/magicLinkParent.js +0 -41
  36. package/dist/mixin/singleLine.js +0 -25
  37. package/dist/mixin/sol.js +0 -43
  38. package/dist/mixin/syntax.js +0 -56
  39. package/dist/parser/braces.js +0 -123
  40. package/dist/parser/commentAndExt.js +0 -69
  41. package/dist/parser/converter.js +0 -40
  42. package/dist/parser/externalLinks.js +0 -28
  43. package/dist/parser/hrAndDoubleUnderscore.js +0 -38
  44. package/dist/parser/html.js +0 -36
  45. package/dist/parser/links.js +0 -94
  46. package/dist/parser/list.js +0 -59
  47. package/dist/parser/magicLinks.js +0 -40
  48. package/dist/parser/quotes.js +0 -67
  49. package/dist/parser/selector.js +0 -163
  50. package/dist/parser/table.js +0 -110
  51. package/dist/src/arg.d.ts +0 -58
  52. package/dist/src/arg.js +0 -190
  53. package/dist/src/atom.d.ts +0 -12
  54. package/dist/src/atom.js +0 -27
  55. package/dist/src/attribute.d.ts +0 -86
  56. package/dist/src/attribute.js +0 -392
  57. package/dist/src/attributes.d.ts +0 -106
  58. package/dist/src/attributes.js +0 -339
  59. package/dist/src/converter.d.ts +0 -51
  60. package/dist/src/converter.js +0 -79
  61. package/dist/src/converterFlags.d.ts +0 -87
  62. package/dist/src/converterFlags.js +0 -223
  63. package/dist/src/converterRule.d.ts +0 -81
  64. package/dist/src/converterRule.js +0 -221
  65. package/dist/src/extLink.d.ts +0 -53
  66. package/dist/src/extLink.js +0 -121
  67. package/dist/src/gallery.d.ts +0 -55
  68. package/dist/src/gallery.js +0 -129
  69. package/dist/src/heading.d.ts +0 -76
  70. package/dist/src/heading.js +0 -127
  71. package/dist/src/hidden.d.ts +0 -21
  72. package/dist/src/hidden.js +0 -23
  73. package/dist/src/html.d.ts +0 -105
  74. package/dist/src/html.js +0 -231
  75. package/dist/src/imageParameter.d.ts +0 -66
  76. package/dist/src/imageParameter.js +0 -246
  77. package/dist/src/imagemap.d.ts +0 -57
  78. package/dist/src/imagemap.js +0 -148
  79. package/dist/src/imagemapLink.d.ts +0 -57
  80. package/dist/src/imagemapLink.js +0 -40
  81. package/dist/src/index.d.ts +0 -145
  82. package/dist/src/index.js +0 -766
  83. package/dist/src/link/base.d.ts +0 -52
  84. package/dist/src/link/base.js +0 -198
  85. package/dist/src/link/category.d.ts +0 -13
  86. package/dist/src/link/category.js +0 -29
  87. package/dist/src/link/file.d.ts +0 -96
  88. package/dist/src/link/file.js +0 -253
  89. package/dist/src/link/galleryImage.d.ts +0 -41
  90. package/dist/src/link/galleryImage.js +0 -98
  91. package/dist/src/link/index.d.ts +0 -53
  92. package/dist/src/link/index.js +0 -123
  93. package/dist/src/magicLink.d.ts +0 -58
  94. package/dist/src/magicLink.js +0 -122
  95. package/dist/src/nested.d.ts +0 -44
  96. package/dist/src/nested.js +0 -87
  97. package/dist/src/nowiki/base.d.ts +0 -46
  98. package/dist/src/nowiki/base.js +0 -42
  99. package/dist/src/nowiki/comment.d.ts +0 -39
  100. package/dist/src/nowiki/comment.js +0 -67
  101. package/dist/src/nowiki/dd.d.ts +0 -8
  102. package/dist/src/nowiki/dd.js +0 -25
  103. package/dist/src/nowiki/doubleUnderscore.d.ts +0 -43
  104. package/dist/src/nowiki/doubleUnderscore.js +0 -51
  105. package/dist/src/nowiki/hr.d.ts +0 -29
  106. package/dist/src/nowiki/hr.js +0 -14
  107. package/dist/src/nowiki/index.d.ts +0 -16
  108. package/dist/src/nowiki/index.js +0 -21
  109. package/dist/src/nowiki/list.d.ts +0 -29
  110. package/dist/src/nowiki/list.js +0 -48
  111. package/dist/src/nowiki/listBase.d.ts +0 -18
  112. package/dist/src/nowiki/listBase.js +0 -12
  113. package/dist/src/nowiki/noinclude.d.ts +0 -25
  114. package/dist/src/nowiki/noinclude.js +0 -25
  115. package/dist/src/nowiki/quote.d.ts +0 -22
  116. package/dist/src/nowiki/quote.js +0 -50
  117. package/dist/src/onlyinclude.d.ts +0 -16
  118. package/dist/src/onlyinclude.js +0 -57
  119. package/dist/src/paramTag/index.d.ts +0 -37
  120. package/dist/src/paramTag/index.js +0 -68
  121. package/dist/src/paramTag/inputbox.d.ts +0 -8
  122. package/dist/src/paramTag/inputbox.js +0 -23
  123. package/dist/src/parameter.d.ts +0 -82
  124. package/dist/src/parameter.js +0 -202
  125. package/dist/src/pre.d.ts +0 -28
  126. package/dist/src/pre.js +0 -51
  127. package/dist/src/syntax.d.ts +0 -25
  128. package/dist/src/syntax.js +0 -30
  129. package/dist/src/table/base.d.ts +0 -52
  130. package/dist/src/table/base.js +0 -78
  131. package/dist/src/table/index.d.ts +0 -229
  132. package/dist/src/table/index.js +0 -379
  133. package/dist/src/table/td.d.ts +0 -102
  134. package/dist/src/table/td.js +0 -261
  135. package/dist/src/table/tr.d.ts +0 -32
  136. package/dist/src/table/tr.js +0 -56
  137. package/dist/src/table/trBase.d.ts +0 -54
  138. package/dist/src/table/trBase.js +0 -151
  139. package/dist/src/tagPair/ext.d.ts +0 -55
  140. package/dist/src/tagPair/ext.js +0 -142
  141. package/dist/src/tagPair/include.d.ts +0 -52
  142. package/dist/src/tagPair/include.js +0 -58
  143. package/dist/src/tagPair/index.d.ts +0 -47
  144. package/dist/src/tagPair/index.js +0 -93
  145. package/dist/src/transclude.d.ts +0 -167
  146. package/dist/src/transclude.js +0 -694
  147. package/dist/util/constants.js +0 -109
  148. package/dist/util/debug.js +0 -65
  149. package/dist/util/diff.js +0 -74
  150. package/dist/util/lint.js +0 -50
  151. package/dist/util/string.js +0 -65
  152. package/errors/README +0 -1
  153. package/printed/README +0 -1
@@ -1,109 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.promises = exports.typeAliases = exports.aliases = exports.utils = exports.parsers = exports.mixins = exports.classes = exports.MAX_STAGE = void 0;
4
- exports.MAX_STAGE = 11;
5
- /* NOT FOR BROWSER */
6
- exports.classes = {};
7
- exports.mixins = {};
8
- exports.parsers = {};
9
- exports.utils = {};
10
- exports.aliases = [
11
- ['AstText'],
12
- ['CommentToken', 'ExtToken', 'IncludeToken', 'NoincludeToken'],
13
- ['ArgToken', 'TranscludeToken', 'HeadingToken'],
14
- ['HtmlToken'],
15
- ['TableToken'],
16
- ['HrToken', 'DoubleUnderscoreToken'],
17
- ['LinkToken', 'FileToken', 'CategoryToken'],
18
- ['QuoteToken'],
19
- ['ExtLinkToken'],
20
- ['MagicLinkToken'],
21
- ['ListToken', 'DdToken'],
22
- ['ConverterToken'],
23
- ];
24
- exports.typeAliases = {
25
- text: ['string', 'str'],
26
- plain: ['regular', 'normal'],
27
- // comment and extension
28
- onlyinclude: ['only-include'],
29
- noinclude: ['no-include'],
30
- include: ['includeonly', 'include-only'],
31
- comment: undefined,
32
- ext: ['extension'],
33
- 'ext-attrs': ['extension-attrs', 'ext-attributes', 'extension-attributes'],
34
- 'ext-attr-dirty': ['extension-attr-dirty', 'ext-attribute-dirty', 'extension-attribute-dirty'],
35
- 'ext-attr': ['extension-attr', 'ext-attribute', 'extension-attribute'],
36
- 'attr-key': ['attribute-key'],
37
- 'attr-value': ['attribute-value', 'attr-val', 'attribute-val'],
38
- 'ext-inner': ['extension-inner'],
39
- // triple braces
40
- arg: ['argument'],
41
- 'arg-name': ['argument-name'],
42
- 'arg-default': ['argument-default'],
43
- hidden: ['arg-redundant'],
44
- // double braces
45
- 'magic-word': ['parser-function', 'parser-func'],
46
- 'magic-word-name': ['parser-function-name', 'parser-func-name'],
47
- 'invoke-function': ['invoke-func', 'lua-function', 'lua-func', 'module-function', 'module-func'],
48
- 'invoke-module': ['lua-module'],
49
- template: undefined,
50
- 'template-name': undefined,
51
- parameter: ['param'],
52
- 'parameter-key': ['param-key'],
53
- 'parameter-value': ['parameter-val', 'param-value', 'param-val'],
54
- // heading
55
- heading: ['header'],
56
- 'heading-title': ['header-title'],
57
- 'heading-trail': ['header-trail'],
58
- // html
59
- html: undefined,
60
- 'html-attrs': ['html-attributes'],
61
- 'html-attr-dirty': ['html-attribute-dirty'],
62
- 'html-attr': ['html-attribute'],
63
- // table
64
- table: undefined,
65
- tr: ['table-row'],
66
- td: ['table-cell', 'table-data'],
67
- 'table-syntax': undefined,
68
- 'table-attrs': ['tr-attrs', 'td-attrs', 'table-attributes', 'tr-attributes', 'td-attributes'],
69
- 'table-attr-dirty': ['tr-attr-dirty', 'td-attr-dirty', 'table-attribute-dirty', 'tr-attribute-dirty', 'td-attribute-dirty'],
70
- 'table-attr': ['tr-attr', 'td-attr', 'table-attribute', 'tr-attribute', 'td-attribute'],
71
- 'table-inter': undefined,
72
- 'td-inner': ['table-cell-inner', 'table-data-inner'],
73
- // hr and double-underscore
74
- hr: ['horizontal'],
75
- 'double-underscore': ['underscore', 'behavior-switch', 'behaviour-switch'],
76
- // link
77
- link: ['wikilink'],
78
- 'link-target': ['wikilink-target'],
79
- 'link-text': ['wikilink-text'],
80
- category: ['category-link', 'cat', 'cat-link'],
81
- file: ['file-link', 'image', 'image-link', 'img', 'img-link'],
82
- 'gallery-image': ['gallery-file', 'gallery-img'],
83
- 'imagemap-image': ['imagemap-file', 'imagemap-img', 'image-map-image', 'image-map-file', 'image-map-img'],
84
- 'image-parameter': ['img-parameter', 'image-param', 'img-param'],
85
- // quotes
86
- quote: ['quotes', 'quot', 'apostrophe', 'apostrophes', 'apos'],
87
- // external link
88
- 'ext-link': ['external-link'],
89
- 'ext-link-text': ['external-link-text'],
90
- 'ext-link-url': ['external-link-url'],
91
- // magic link
92
- 'free-ext-link': ['free-external-link', 'magic-link'],
93
- // list
94
- list: ['ol', 'ordered-list', 'ul', 'unordered-list', 'dl', 'description-list'],
95
- dd: ['indent', 'indentation'],
96
- // converter
97
- converter: ['convert', 'conversion'],
98
- 'converter-flags': ['convert-flags', 'conversion-flags'],
99
- 'converter-flag': ['convert-flag', 'conversion-flag'],
100
- 'converter-rule': ['convert-rule', 'conversion-rule'],
101
- 'converter-rule-noconvert': ['convert-rule-noconvert', 'conversion-rule-noconvert'],
102
- 'converter-rule-variant': ['convert-rule-variant', 'conversion-rule-variant'],
103
- 'converter-rule-to': ['convert-rule-to', 'conversion-rule-to'],
104
- 'converter-rule-from': ['convert-rule-from', 'conversion-rule-from'],
105
- // specific extensions
106
- 'param-line': ['parameter-line'],
107
- 'imagemap-link': ['image-map-link'],
108
- };
109
- exports.promises = [Promise.resolve()];
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.undo = exports.Shadow = void 0;
4
- const constants_1 = require("./constants");
5
- // eslint-disable-next-line @typescript-eslint/no-redeclare
6
- exports.Shadow = {
7
- /* NOT FOR BROWSER */
8
- running: false,
9
- /* NOT FOR BROWSER END */
10
- /** @implements */
11
- run(callback) {
12
- const { running } = this;
13
- this.running = true;
14
- try {
15
- const result = callback();
16
- this.running = running;
17
- return result;
18
- }
19
- catch (e) {
20
- this.running = running;
21
- throw e;
22
- }
23
- },
24
- };
25
- /* NOT FOR BROWSER */
26
- /**
27
- * 撤销最近一次Mutation
28
- * @param e 事件
29
- * @param data 事件数据
30
- * @throws `RangeError` 无法撤销的事件类型
31
- */
32
- const undo = (e, data) => {
33
- const { target, type } = e;
34
- switch (type) {
35
- case 'remove': {
36
- const childNodes = [...target.childNodes];
37
- childNodes.splice(data.position, 0, data.removed);
38
- data.removed.setAttribute('parentNode', target);
39
- target.setAttribute('childNodes', childNodes);
40
- break;
41
- }
42
- case 'insert': {
43
- const childNodes = [...target.childNodes];
44
- childNodes.splice(data.position, 1);
45
- target.setAttribute('childNodes', childNodes);
46
- break;
47
- }
48
- case 'replace': {
49
- const { parentNode } = target, childNodes = [...parentNode.childNodes];
50
- childNodes.splice(data.position, 1, data.oldToken);
51
- data.oldToken.setAttribute('parentNode', parentNode);
52
- parentNode.setAttribute('childNodes', childNodes);
53
- break;
54
- }
55
- case 'text':
56
- if (target.type === 'text') {
57
- target.replaceData(data.oldText);
58
- }
59
- break;
60
- default:
61
- throw new RangeError(`无法撤销未知类型的事件:${String(type)}`);
62
- }
63
- };
64
- exports.undo = undo;
65
- constants_1.utils['debug'] = __filename;
package/dist/util/diff.js DELETED
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.diff = exports.cmd = void 0;
4
- const fs = require("fs/promises");
5
- const child_process_1 = require("child_process");
6
- const constants_1 = require("./constants");
7
- process.on('unhandledRejection', e => {
8
- console.error(e);
9
- });
10
- /**
11
- * 将shell命令转化为Promise对象
12
- * @param command shell指令
13
- * @param args shell输入参数
14
- */
15
- const cmd = (command, args) => new Promise(resolve => {
16
- let timer, shell;
17
- /**
18
- * 清除进程并返回
19
- * @param val 返回值
20
- */
21
- const r = (val) => {
22
- clearTimeout(timer);
23
- shell?.kill('SIGINT');
24
- resolve(val);
25
- };
26
- try {
27
- shell = (0, child_process_1.spawn)(command, args);
28
- timer = setTimeout(() => {
29
- shell.kill('SIGINT');
30
- }, 60 * 1000);
31
- let buf = '';
32
- shell.stdout.on('data', data => {
33
- buf += String(data);
34
- });
35
- shell.stdout.on('end', () => {
36
- r(buf);
37
- });
38
- shell.on('exit', () => {
39
- r(shell.killed ? undefined : '');
40
- });
41
- shell.on('error', () => {
42
- r(undefined);
43
- });
44
- }
45
- catch {
46
- r(undefined);
47
- }
48
- });
49
- exports.cmd = cmd;
50
- /**
51
- * 比较两个文件
52
- * @param oldStr 旧文本
53
- * @param newStr 新文本
54
- * @param uid 唯一标识
55
- */
56
- const diff = async (oldStr, newStr, uid = -1) => {
57
- if (oldStr === newStr) {
58
- return;
59
- }
60
- const oldFile = `diffOld${uid}`, newFile = `diffNew${uid}`;
61
- await Promise.all([fs.writeFile(oldFile, oldStr), fs.writeFile(newFile, newStr)]);
62
- const stdout = await (0, exports.cmd)('git', [
63
- 'diff',
64
- '--color-words=[\xC0-\xFF][\x80-\xBF]+|<?/?\\w+/?>?|[^[:space:]]',
65
- '-U0',
66
- '--no-index',
67
- oldFile,
68
- newFile,
69
- ]);
70
- await Promise.all([fs.unlink(oldFile), fs.unlink(newFile)]);
71
- console.log(stdout?.split('\n').slice(4).join('\n'));
72
- };
73
- exports.diff = diff;
74
- constants_1.utils['diff'] = __filename;
package/dist/util/lint.js DELETED
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateForSelf = exports.generateForChild = void 0;
4
- const constants_1 = require("./constants");
5
- const Parser = require("../index");
6
- /**
7
- * 生成对于子节点的LintError对象
8
- * @param child 子节点
9
- * @param boundingRect 父节点的绝对定位
10
- * @param msg 错误信息
11
- * @param severity 严重程度
12
- */
13
- const generateForChild = (child, boundingRect, msg, severity = 'error') => {
14
- const index = child.getRelativeIndex(), { offsetHeight, offsetWidth, parentNode } = child, { top: offsetTop, left: offsetLeft } = parentNode.posFromIndex(index), { start } = boundingRect, { top, left } = 'top' in boundingRect ? boundingRect : child.getRootNode().posFromIndex(start), str = String(child), startIndex = start + index, startLine = top + offsetTop, startCol = offsetTop ? offsetLeft : left + offsetLeft;
15
- return {
16
- message: Parser.msg(msg),
17
- severity,
18
- startIndex,
19
- endIndex: startIndex + str.length,
20
- startLine,
21
- endLine: startLine + offsetHeight - 1,
22
- startCol,
23
- endCol: offsetHeight === 1 ? startCol + offsetWidth : offsetWidth,
24
- excerpt: str.slice(0, 50),
25
- };
26
- };
27
- exports.generateForChild = generateForChild;
28
- /**
29
- * 生成对于自己的LintError对象
30
- * @param token 节点
31
- * @param boundingRect 绝对定位
32
- * @param msg 错误信息
33
- * @param severity 严重程度
34
- */
35
- const generateForSelf = (token, boundingRect, msg, severity = 'error') => {
36
- const { start } = boundingRect, { offsetHeight, offsetWidth } = token, str = String(token), { top, left } = 'top' in boundingRect ? boundingRect : token.getRootNode().posFromIndex(start);
37
- return {
38
- message: Parser.msg(msg),
39
- severity,
40
- startIndex: start,
41
- endIndex: start + str.length,
42
- startLine: top,
43
- endLine: top + offsetHeight - 1,
44
- startCol: left,
45
- endCol: offsetHeight === 1 ? left + offsetWidth : offsetWidth,
46
- excerpt: str.slice(0, 50),
47
- };
48
- };
49
- exports.generateForSelf = generateForSelf;
50
- constants_1.utils['lint'] = __filename;
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeSpace = exports.print = exports.noWrap = exports.decodeHtml = exports.text = exports.escapeRegExp = exports.removeComment = exports.extUrlChar = exports.extUrlCharFirst = void 0;
4
- const constants_1 = require("./constants");
5
- exports.extUrlCharFirst = '(?:\\[[\\da-f:.]+\\]|[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD])';
6
- exports.extUrlChar = '(?:[^[\\]<>"\\0-\\x1F\\x7F\\p{Zs}\\uFFFD]|\\0\\d+c\\x7F)*';
7
- /**
8
- * remove half-parsed comment-like tokens
9
- * @param str 原字符串
10
- */
11
- const removeComment = (str) => str.replace(/\0\d+c\x7F/gu, '');
12
- exports.removeComment = removeComment;
13
- /**
14
- * escape special chars for RegExp constructor
15
- * @param str RegExp source
16
- */
17
- const escapeRegExp = (str) => str.replace(/[\\{}()|.?*+^$[\]]/gu, '\\$&');
18
- exports.escapeRegExp = escapeRegExp;
19
- /**
20
- * extract effective wikitext
21
- * @param childNodes a Token's contents
22
- * @param separator delimiter between nodes
23
- */
24
- const text = (childNodes, separator = '') => childNodes.map(child => typeof child === 'string' ? child : child.text()).join(separator);
25
- exports.text = text;
26
- /**
27
- * decode HTML entities
28
- * @param str 原字符串
29
- */
30
- const decodeHtml = (str) => str.replace(/&#(\d+|x[\da-f]+);/giu, (_, code) => String.fromCodePoint(Number(`${code[0].toLowerCase() === 'x' ? '0' : ''}${code}`)));
31
- exports.decodeHtml = decodeHtml;
32
- /**
33
- * escape newlines
34
- * @param str 原字符串
35
- */
36
- const noWrap = (str) => str.replaceAll('\n', '\\n');
37
- exports.noWrap = noWrap;
38
- /**
39
- * 以HTML格式打印
40
- * @param childNodes 子节点
41
- * @param opt 选项
42
- */
43
- const print = (childNodes, opt = {}) => {
44
- const { pre = '', post = '', sep = '' } = opt, entities = { '&': 'amp', '<': 'lt', '>': 'gt' };
45
- return `${pre}${childNodes.map(child => child.type === 'text'
46
- ? child.data.replace(/[&<>]/gu, p => `&${entities[p]};`)
47
- : child.print()).join(sep)}${post}`;
48
- };
49
- exports.print = print;
50
- /* NOT FOR BROWSER */
51
- /**
52
- * convert newline in text nodes to single whitespace
53
- * @param token 父节点
54
- */
55
- const normalizeSpace = (token) => {
56
- if (token) {
57
- for (const child of token.childNodes) {
58
- if (child.type === 'text') {
59
- child.replaceData(child.data.replaceAll('\n', ' '));
60
- }
61
- }
62
- }
63
- };
64
- exports.normalizeSpace = normalizeSpace;
65
- constants_1.utils['string'] = __filename;
package/errors/README DELETED
@@ -1 +0,0 @@
1
- 这里记录解析失败时处于半解析状态的维基文本以及错误信息。
package/printed/README DELETED
@@ -1 +0,0 @@
1
- 这里存放以 JSON 格式打印的 AST。