wikiparser-node 1.12.5-b → 1.12.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/config/.schema.json +203 -0
- package/config/default.json +30 -29
- package/config/enwiki.json +829 -15
- package/config/llwiki.json +56 -21
- package/config/moegirl.json +65 -21
- package/config/zhwiki.json +494 -28
- package/dist/addon/table.js +494 -0
- package/dist/addon/token.js +392 -0
- package/dist/addon/transclude.js +184 -0
- package/dist/base.d.ts +82 -0
- package/dist/base.js +40 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +275 -0
- package/dist/internal.d.ts +47 -0
- package/dist/lib/element.d.ts +125 -0
- package/dist/lib/element.js +377 -0
- package/dist/lib/node.d.ts +173 -0
- package/dist/lib/node.js +478 -0
- package/dist/lib/range.d.ts +105 -0
- package/dist/lib/range.js +406 -0
- package/dist/lib/ranges.d.ts +28 -0
- package/dist/lib/ranges.js +126 -0
- package/dist/lib/rect.d.ts +18 -0
- package/dist/lib/rect.js +36 -0
- package/dist/lib/text.d.ts +58 -0
- package/dist/lib/text.js +414 -0
- package/dist/lib/title.d.ts +49 -0
- package/dist/lib/title.js +253 -0
- package/dist/mixin/attributesParent.d.ts +49 -0
- package/dist/mixin/attributesParent.js +80 -0
- package/dist/mixin/fixed.d.ts +5 -0
- package/dist/mixin/fixed.js +32 -0
- package/dist/mixin/flagsParent.d.ts +43 -0
- package/dist/mixin/flagsParent.js +64 -0
- package/dist/mixin/hidden.d.ts +7 -0
- package/dist/mixin/hidden.js +39 -0
- package/dist/mixin/magicLinkParent.d.ts +19 -0
- package/dist/mixin/magicLinkParent.js +43 -0
- package/dist/mixin/singleLine.d.ts +5 -0
- package/dist/mixin/singleLine.js +25 -0
- package/dist/mixin/sol.d.ts +6 -0
- package/dist/mixin/sol.js +45 -0
- package/dist/mixin/syntax.d.ts +8 -0
- package/dist/mixin/syntax.js +46 -0
- package/dist/parser/braces.js +152 -0
- package/dist/parser/commentAndExt.js +84 -0
- package/dist/parser/converter.js +41 -0
- package/dist/parser/externalLinks.js +39 -0
- package/dist/parser/hrAndDoubleUnderscore.js +44 -0
- package/dist/parser/html.js +40 -0
- package/dist/parser/links.js +103 -0
- package/dist/parser/list.js +116 -0
- package/dist/parser/magicLinks.js +55 -0
- package/dist/parser/quotes.js +69 -0
- package/dist/parser/redirect.js +28 -0
- package/dist/parser/selector.js +393 -0
- package/dist/parser/table.js +125 -0
- package/dist/src/arg.d.ts +49 -0
- package/dist/src/arg.js +220 -0
- package/dist/src/atom.d.ts +14 -0
- package/dist/src/atom.js +54 -0
- package/dist/src/attribute.d.ts +64 -0
- package/dist/src/attribute.js +482 -0
- package/dist/src/attributes.d.ts +103 -0
- package/dist/src/attributes.js +380 -0
- package/dist/src/converter.d.ts +28 -0
- package/dist/src/converter.js +153 -0
- package/dist/src/converterFlags.d.ts +80 -0
- package/dist/src/converterFlags.js +241 -0
- package/dist/src/converterRule.d.ts +71 -0
- package/dist/src/converterRule.js +218 -0
- package/dist/src/extLink.d.ts +36 -0
- package/dist/src/extLink.js +223 -0
- package/dist/src/gallery.d.ts +51 -0
- package/dist/src/gallery.js +166 -0
- package/dist/src/heading.d.ts +44 -0
- package/dist/src/heading.js +222 -0
- package/dist/src/hidden.d.ts +9 -0
- package/dist/src/hidden.js +82 -0
- package/dist/src/html.d.ts +61 -0
- package/dist/src/html.js +344 -0
- package/dist/src/imageParameter.d.ts +60 -0
- package/dist/src/imageParameter.js +262 -0
- package/dist/src/imagemap.d.ts +47 -0
- package/dist/src/imagemap.js +148 -0
- package/dist/src/imagemapLink.d.ts +35 -0
- package/dist/src/imagemapLink.js +99 -0
- package/dist/src/index.d.ts +136 -0
- package/dist/src/index.js +790 -0
- package/dist/src/link/base.d.ts +52 -0
- package/dist/src/link/base.js +258 -0
- package/dist/src/link/category.d.ts +22 -0
- package/dist/src/link/category.js +36 -0
- package/dist/src/link/file.d.ts +102 -0
- package/dist/src/link/file.js +345 -0
- package/dist/src/link/galleryImage.d.ts +29 -0
- package/dist/src/link/galleryImage.js +133 -0
- package/dist/src/link/index.d.ts +39 -0
- package/dist/src/link/index.js +100 -0
- package/dist/src/link/redirectTarget.d.ts +27 -0
- package/dist/src/link/redirectTarget.js +71 -0
- package/dist/src/magicLink.d.ts +57 -0
- package/dist/src/magicLink.js +261 -0
- package/dist/src/nested.d.ts +40 -0
- package/dist/src/nested.js +108 -0
- package/dist/src/nowiki/base.d.ts +28 -0
- package/dist/src/nowiki/base.js +90 -0
- package/dist/src/nowiki/comment.d.ts +14 -0
- package/dist/src/nowiki/comment.js +123 -0
- package/dist/src/nowiki/dd.d.ts +8 -0
- package/dist/src/nowiki/dd.js +74 -0
- package/dist/src/nowiki/doubleUnderscore.d.ts +15 -0
- package/dist/src/nowiki/doubleUnderscore.js +101 -0
- package/dist/src/nowiki/hr.d.ts +5 -0
- package/dist/src/nowiki/hr.js +72 -0
- package/dist/src/nowiki/index.d.ts +14 -0
- package/dist/src/nowiki/index.js +30 -0
- package/dist/src/nowiki/list.d.ts +5 -0
- package/dist/src/nowiki/list.js +67 -0
- package/dist/src/nowiki/listBase.d.ts +23 -0
- package/dist/src/nowiki/listBase.js +100 -0
- package/dist/src/nowiki/noinclude.d.ts +6 -0
- package/dist/src/nowiki/noinclude.js +77 -0
- package/dist/src/nowiki/quote.d.ts +14 -0
- package/dist/src/nowiki/quote.js +149 -0
- package/dist/src/onlyinclude.d.ts +13 -0
- package/dist/src/onlyinclude.js +60 -0
- package/dist/src/paramTag/index.d.ts +28 -0
- package/dist/src/paramTag/index.js +80 -0
- package/dist/src/paramTag/inputbox.d.ts +8 -0
- package/dist/src/paramTag/inputbox.js +24 -0
- package/dist/src/parameter.d.ts +60 -0
- package/dist/src/parameter.js +267 -0
- package/dist/src/pre.d.ts +28 -0
- package/dist/src/pre.js +62 -0
- package/dist/src/redirect.d.ts +30 -0
- package/dist/src/redirect.js +128 -0
- package/dist/src/syntax.d.ts +15 -0
- package/dist/src/syntax.js +87 -0
- package/dist/src/table/base.d.ts +28 -0
- package/dist/src/table/base.js +81 -0
- package/dist/src/table/index.d.ts +230 -0
- package/dist/src/table/index.js +506 -0
- package/dist/src/table/td.d.ts +72 -0
- package/dist/src/table/td.js +375 -0
- package/dist/src/table/tr.d.ts +30 -0
- package/dist/src/table/tr.js +61 -0
- package/dist/src/table/trBase.d.ts +49 -0
- package/dist/src/table/trBase.js +165 -0
- package/dist/src/tagPair/ext.d.ts +29 -0
- package/dist/src/tagPair/ext.js +229 -0
- package/dist/src/tagPair/include.d.ts +33 -0
- package/dist/src/tagPair/include.js +132 -0
- package/dist/src/tagPair/index.d.ts +23 -0
- package/dist/src/tagPair/index.js +130 -0
- package/dist/src/transclude.d.ts +159 -0
- package/dist/src/transclude.js +598 -0
- package/dist/util/constants.js +26 -0
- package/dist/util/debug.js +95 -0
- package/dist/util/diff.js +83 -0
- package/dist/util/html.js +146 -0
- package/dist/util/lint.js +32 -0
- package/dist/util/string.js +107 -0
- package/errors/README +3 -0
- package/package.json +21 -28
- package/printed/README +3 -0
- package/bundle/bundle.min.js +0 -37
- package/extensions/dist/base.js +0 -163
- package/extensions/dist/codejar.js +0 -52
- package/extensions/dist/editor.js +0 -159
- package/extensions/dist/highlight.js +0 -30
- package/extensions/dist/lint.js +0 -72
- package/extensions/editor.css +0 -59
- package/extensions/ui.css +0 -162
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.CommentToken = void 0;
|
|
38
|
+
const lint_1 = require("../../util/lint");
|
|
39
|
+
const hidden_1 = require("../../mixin/hidden");
|
|
40
|
+
const index_1 = require("../../index");
|
|
41
|
+
const base_1 = require("./base");
|
|
42
|
+
/* NOT FOR BROWSER */
|
|
43
|
+
const debug_1 = require("../../util/debug");
|
|
44
|
+
const constants_1 = require("../../util/constants");
|
|
45
|
+
/* NOT FOR BROWSER END */
|
|
46
|
+
/** HTML注释,不可见 */
|
|
47
|
+
let CommentToken = (() => {
|
|
48
|
+
let _classDecorators = [(0, hidden_1.hiddenToken)(false)];
|
|
49
|
+
let _classDescriptor;
|
|
50
|
+
let _classExtraInitializers = [];
|
|
51
|
+
let _classThis;
|
|
52
|
+
let _classSuper = base_1.NowikiBaseToken;
|
|
53
|
+
var CommentToken = class extends _classSuper {
|
|
54
|
+
static { _classThis = this; }
|
|
55
|
+
static {
|
|
56
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
57
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
58
|
+
CommentToken = _classThis = _classDescriptor.value;
|
|
59
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
60
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
61
|
+
}
|
|
62
|
+
closed;
|
|
63
|
+
get type() {
|
|
64
|
+
return 'comment';
|
|
65
|
+
}
|
|
66
|
+
/* NOT FOR BROWSER */
|
|
67
|
+
/** 内部文本 */
|
|
68
|
+
get innerText() {
|
|
69
|
+
return super.innerText;
|
|
70
|
+
}
|
|
71
|
+
set innerText(text) {
|
|
72
|
+
this.setText(text);
|
|
73
|
+
}
|
|
74
|
+
/* NOT FOR BROWSER END */
|
|
75
|
+
/** @param closed 是否闭合 */
|
|
76
|
+
constructor(wikitext, closed = true, config, accum) {
|
|
77
|
+
super(wikitext, config, accum);
|
|
78
|
+
this.closed = closed;
|
|
79
|
+
}
|
|
80
|
+
/** @private */
|
|
81
|
+
getAttribute(key) {
|
|
82
|
+
return key === 'padding' ? 4 : super.getAttribute(key);
|
|
83
|
+
}
|
|
84
|
+
/** @private */
|
|
85
|
+
lint(start = this.getAbsoluteIndex()) {
|
|
86
|
+
if (this.closed) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
const e = (0, lint_1.generateForSelf)(this, { start }, 'unclosed-comment', index_1.default.msg('unclosed $1', 'HTML comment'));
|
|
90
|
+
e.fix = { range: [e.endIndex, e.endIndex], text: '-->' };
|
|
91
|
+
return [e];
|
|
92
|
+
}
|
|
93
|
+
/** @private */
|
|
94
|
+
toString(skip) {
|
|
95
|
+
/* NOT FOR BROWSER */
|
|
96
|
+
if (!this.closed && this.nextSibling) {
|
|
97
|
+
index_1.default.error('Auto-closing HTML comment', this);
|
|
98
|
+
this.closed = true;
|
|
99
|
+
}
|
|
100
|
+
/* NOT FOR BROWSER END */
|
|
101
|
+
return skip ? '' : `<!--${this.innerText}${this.closed ? '-->' : ''}`;
|
|
102
|
+
}
|
|
103
|
+
/** @private */
|
|
104
|
+
print() {
|
|
105
|
+
return super.print({ pre: '<!--', post: this.closed ? '-->' : '' });
|
|
106
|
+
}
|
|
107
|
+
/* NOT FOR BROWSER */
|
|
108
|
+
cloneNode() {
|
|
109
|
+
// @ts-expect-error abstract class
|
|
110
|
+
return debug_1.Shadow.run(() => new CommentToken(this.innerText, this.closed, this.getAttribute('config')));
|
|
111
|
+
}
|
|
112
|
+
/** @private */
|
|
113
|
+
setText(text) {
|
|
114
|
+
if (text.includes('-->')) {
|
|
115
|
+
throw new RangeError('Do not contain "-->" in the comment!');
|
|
116
|
+
}
|
|
117
|
+
return super.setText(text);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
return CommentToken = _classThis;
|
|
121
|
+
})();
|
|
122
|
+
exports.CommentToken = CommentToken;
|
|
123
|
+
constants_1.classes['CommentToken'] = __filename;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.DdToken = void 0;
|
|
38
|
+
const listBase_1 = require("./listBase");
|
|
39
|
+
/* NOT FOR BROWSER */
|
|
40
|
+
const constants_1 = require("../../util/constants");
|
|
41
|
+
const syntax_1 = require("../../mixin/syntax");
|
|
42
|
+
/* NOT FOR BROWSER END */
|
|
43
|
+
/** `:` */
|
|
44
|
+
let DdToken = (() => {
|
|
45
|
+
let _classDecorators = [(0, syntax_1.syntax)(/^:+$/u)];
|
|
46
|
+
let _classDescriptor;
|
|
47
|
+
let _classExtraInitializers = [];
|
|
48
|
+
let _classThis;
|
|
49
|
+
let _classSuper = listBase_1.ListBaseToken;
|
|
50
|
+
var DdToken = class extends _classSuper {
|
|
51
|
+
static { _classThis = this; }
|
|
52
|
+
static {
|
|
53
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
54
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
55
|
+
DdToken = _classThis = _classDescriptor.value;
|
|
56
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
57
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
58
|
+
}
|
|
59
|
+
get type() {
|
|
60
|
+
return 'dd';
|
|
61
|
+
}
|
|
62
|
+
/* NOT FOR BROWSER */
|
|
63
|
+
/** 缩进数 */
|
|
64
|
+
get indent() {
|
|
65
|
+
return this.innerText.length;
|
|
66
|
+
}
|
|
67
|
+
set indent(indent) {
|
|
68
|
+
this.setText(':'.repeat(indent));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return DdToken = _classThis;
|
|
72
|
+
})();
|
|
73
|
+
exports.DdToken = DdToken;
|
|
74
|
+
constants_1.classes['DdToken'] = __filename;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Parser from '../../index';
|
|
2
|
+
import { NowikiBaseToken } from './base';
|
|
3
|
+
import type { Token } from '../index';
|
|
4
|
+
/** 状态开关 */
|
|
5
|
+
export declare abstract class DoubleUnderscoreToken extends NowikiBaseToken {
|
|
6
|
+
#private;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
get type(): 'double-underscore';
|
|
9
|
+
/**
|
|
10
|
+
* @param word 状态开关名
|
|
11
|
+
* @param sensitive 是否固定大小写
|
|
12
|
+
*/
|
|
13
|
+
constructor(word: string, sensitive: boolean, config?: Parser.Config, accum?: Token[]);
|
|
14
|
+
cloneNode(): this;
|
|
15
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.DoubleUnderscoreToken = void 0;
|
|
38
|
+
const hidden_1 = require("../../mixin/hidden");
|
|
39
|
+
const index_1 = require("../../index");
|
|
40
|
+
const base_1 = require("./base");
|
|
41
|
+
/* NOT FOR BROWSER */
|
|
42
|
+
const debug_1 = require("../../util/debug");
|
|
43
|
+
const constants_1 = require("../../util/constants");
|
|
44
|
+
const syntax_1 = require("../../mixin/syntax");
|
|
45
|
+
/* NOT FOR BROWSER END */
|
|
46
|
+
/** 状态开关 */
|
|
47
|
+
let DoubleUnderscoreToken = (() => {
|
|
48
|
+
let _classDecorators = [(0, syntax_1.syntax)(), (0, hidden_1.hiddenToken)()];
|
|
49
|
+
let _classDescriptor;
|
|
50
|
+
let _classExtraInitializers = [];
|
|
51
|
+
let _classThis;
|
|
52
|
+
let _classSuper = base_1.NowikiBaseToken;
|
|
53
|
+
var DoubleUnderscoreToken = class extends _classSuper {
|
|
54
|
+
static { _classThis = this; }
|
|
55
|
+
static {
|
|
56
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
57
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
58
|
+
DoubleUnderscoreToken = _classThis = _classDescriptor.value;
|
|
59
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
60
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
61
|
+
}
|
|
62
|
+
#sensitive;
|
|
63
|
+
/* NOT FOR BROWSER END */
|
|
64
|
+
get type() {
|
|
65
|
+
return 'double-underscore';
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @param word 状态开关名
|
|
69
|
+
* @param sensitive 是否固定大小写
|
|
70
|
+
*/
|
|
71
|
+
constructor(word, sensitive, config = index_1.default.getConfig(), accum) {
|
|
72
|
+
super(word, config, accum);
|
|
73
|
+
/* NOT FOR BROWSER */
|
|
74
|
+
const lc = word.toLowerCase();
|
|
75
|
+
this.#sensitive = sensitive;
|
|
76
|
+
this.setAttribute('name', sensitive ? lc : config.doubleUnderscore[2]?.[lc] ?? lc);
|
|
77
|
+
this.setAttribute('pattern', new RegExp(`^${word}$`, sensitive ? 'u' : 'iu'));
|
|
78
|
+
}
|
|
79
|
+
/** @private */
|
|
80
|
+
getAttribute(key) {
|
|
81
|
+
return key === 'padding' ? 2 : super.getAttribute(key);
|
|
82
|
+
}
|
|
83
|
+
/** @private */
|
|
84
|
+
toString() {
|
|
85
|
+
return `__${this.innerText}__`;
|
|
86
|
+
}
|
|
87
|
+
/** @private */
|
|
88
|
+
print() {
|
|
89
|
+
return super.print({ pre: '__', post: '__' });
|
|
90
|
+
}
|
|
91
|
+
/* NOT FOR BROWSER */
|
|
92
|
+
cloneNode() {
|
|
93
|
+
const config = this.getAttribute('config');
|
|
94
|
+
// @ts-expect-error abstract class
|
|
95
|
+
return debug_1.Shadow.run(() => new DoubleUnderscoreToken(this.innerText, this.#sensitive, config));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return DoubleUnderscoreToken = _classThis;
|
|
99
|
+
})();
|
|
100
|
+
exports.DoubleUnderscoreToken = DoubleUnderscoreToken;
|
|
101
|
+
constants_1.classes['DoubleUnderscoreToken'] = __filename;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.HrToken = void 0;
|
|
38
|
+
const base_1 = require("./base");
|
|
39
|
+
/* NOT FOR BROWSER */
|
|
40
|
+
const constants_1 = require("../../util/constants");
|
|
41
|
+
const sol_1 = require("../../mixin/sol");
|
|
42
|
+
const syntax_1 = require("../../mixin/syntax");
|
|
43
|
+
/* NOT FOR BROWSER END */
|
|
44
|
+
/** `<hr>` */
|
|
45
|
+
let HrToken = (() => {
|
|
46
|
+
let _classDecorators = [(0, sol_1.sol)(), (0, syntax_1.syntax)(/^-{4,}$/u)];
|
|
47
|
+
let _classDescriptor;
|
|
48
|
+
let _classExtraInitializers = [];
|
|
49
|
+
let _classThis;
|
|
50
|
+
let _classSuper = base_1.NowikiBaseToken;
|
|
51
|
+
var HrToken = class extends _classSuper {
|
|
52
|
+
static { _classThis = this; }
|
|
53
|
+
static {
|
|
54
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
55
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
56
|
+
HrToken = _classThis = _classDescriptor.value;
|
|
57
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
58
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
59
|
+
}
|
|
60
|
+
get type() {
|
|
61
|
+
return 'hr';
|
|
62
|
+
}
|
|
63
|
+
/* NOT FOR BROWSER */
|
|
64
|
+
/** @private */
|
|
65
|
+
toHtmlInternal() {
|
|
66
|
+
return '<hr>';
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return HrToken = _classThis;
|
|
70
|
+
})();
|
|
71
|
+
exports.HrToken = HrToken;
|
|
72
|
+
constants_1.classes['HrToken'] = __filename;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NowikiBaseToken } from './base';
|
|
2
|
+
import type { LintError } from '../../base';
|
|
3
|
+
import type { AttributesToken, ExtToken } from '../../internal';
|
|
4
|
+
/** 扩展标签内的纯文字Token */
|
|
5
|
+
export declare abstract class NowikiToken extends NowikiBaseToken {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
abstract get nextSibling(): undefined;
|
|
8
|
+
abstract get previousSibling(): AttributesToken;
|
|
9
|
+
abstract get parentNode(): ExtToken | undefined;
|
|
10
|
+
abstract get nextElementSibling(): undefined;
|
|
11
|
+
abstract get previousElementSibling(): AttributesToken;
|
|
12
|
+
abstract get parentElement(): ExtToken | undefined;
|
|
13
|
+
get type(): 'ext-inner';
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NowikiToken = void 0;
|
|
4
|
+
const lint_1 = require("../../util/lint");
|
|
5
|
+
const index_1 = require("../../index");
|
|
6
|
+
const base_1 = require("./base");
|
|
7
|
+
/* NOT FOR BROWSER */
|
|
8
|
+
const constants_1 = require("../../util/constants");
|
|
9
|
+
/* NOT FOR BROWSER END */
|
|
10
|
+
/** 扩展标签内的纯文字Token */
|
|
11
|
+
class NowikiToken extends base_1.NowikiBaseToken {
|
|
12
|
+
/* NOT FOR BROWSER END */
|
|
13
|
+
get type() {
|
|
14
|
+
return 'ext-inner';
|
|
15
|
+
}
|
|
16
|
+
/** @private */
|
|
17
|
+
lint(start = this.getAbsoluteIndex()) {
|
|
18
|
+
const { name, firstChild: { data } } = this;
|
|
19
|
+
if ((name === 'templatestyles' || name === 'section') && data) {
|
|
20
|
+
const e = (0, lint_1.generateForSelf)(this, { start }, 'void-ext', index_1.default.msg('nothing should be in <$1>', name));
|
|
21
|
+
e.fix = { range: [start, e.endIndex], text: '' };
|
|
22
|
+
return [e];
|
|
23
|
+
}
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
25
|
+
/<\s*(?:\/\s*)?(nowiki)\b/giu;
|
|
26
|
+
return super.lint(start, new RegExp(String.raw `<\s*(?:/\s*)${name === 'nowiki' ? '' : '?'}(${name})\b`, 'giu'));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.NowikiToken = NowikiToken;
|
|
30
|
+
constants_1.classes['NowikiToken'] = __filename;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ListToken = void 0;
|
|
38
|
+
const listBase_1 = require("./listBase");
|
|
39
|
+
/* NOT FOR BROWSER */
|
|
40
|
+
const constants_1 = require("../../util/constants");
|
|
41
|
+
const sol_1 = require("../../mixin/sol");
|
|
42
|
+
const syntax_1 = require("../../mixin/syntax");
|
|
43
|
+
/* NOT FOR BROWSER END */
|
|
44
|
+
/** 位于行首的`;:*#` */
|
|
45
|
+
let ListToken = (() => {
|
|
46
|
+
let _classDecorators = [(0, sol_1.sol)(true), (0, syntax_1.syntax)(/^[;:*#]+$/u)];
|
|
47
|
+
let _classDescriptor;
|
|
48
|
+
let _classExtraInitializers = [];
|
|
49
|
+
let _classThis;
|
|
50
|
+
let _classSuper = listBase_1.ListBaseToken;
|
|
51
|
+
var ListToken = class extends _classSuper {
|
|
52
|
+
static { _classThis = this; }
|
|
53
|
+
static {
|
|
54
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
55
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
56
|
+
ListToken = _classThis = _classDescriptor.value;
|
|
57
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
58
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
59
|
+
}
|
|
60
|
+
get type() {
|
|
61
|
+
return 'list';
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return ListToken = _classThis;
|
|
65
|
+
})();
|
|
66
|
+
exports.ListToken = ListToken;
|
|
67
|
+
constants_1.classes['ListToken'] = __filename;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NowikiBaseToken } from './base';
|
|
2
|
+
import { Token } from '../index';
|
|
3
|
+
import type { DdToken, ListToken, AstText } from '../../internal';
|
|
4
|
+
export interface ListRangeToken extends Token {
|
|
5
|
+
readonly type: 'list-range';
|
|
6
|
+
readonly previousSibling: ListToken | DdToken;
|
|
7
|
+
readonly nextSibling: DdToken | AstText | undefined;
|
|
8
|
+
readonly previousElementSibling: ListToken | DdToken;
|
|
9
|
+
}
|
|
10
|
+
/** `;:*#` */
|
|
11
|
+
export declare abstract class ListBaseToken extends NowikiBaseToken {
|
|
12
|
+
abstract get type(): 'dd' | 'list';
|
|
13
|
+
/** 是否包含`:` */
|
|
14
|
+
get dd(): boolean;
|
|
15
|
+
/** 是否包含`;` */
|
|
16
|
+
get dt(): boolean;
|
|
17
|
+
/** 是否包含`*` */
|
|
18
|
+
get ul(): boolean;
|
|
19
|
+
/** 是否包含`#` */
|
|
20
|
+
get ol(): boolean;
|
|
21
|
+
/** 获取列表行的范围 */
|
|
22
|
+
getRange(): ListRangeToken;
|
|
23
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListBaseToken = void 0;
|
|
4
|
+
const base_1 = require("./base");
|
|
5
|
+
/* NOT FOR BROWSER */
|
|
6
|
+
const constants_1 = require("../../util/constants");
|
|
7
|
+
const debug_1 = require("../../util/debug");
|
|
8
|
+
const index_1 = require("../index");
|
|
9
|
+
/* NOT FOR BROWSER END */
|
|
10
|
+
/** `;:*#` */
|
|
11
|
+
class ListBaseToken extends base_1.NowikiBaseToken {
|
|
12
|
+
/* NOT FOR BROWSER */
|
|
13
|
+
/** 是否包含`:` */
|
|
14
|
+
get dd() {
|
|
15
|
+
return this.innerText.includes(':');
|
|
16
|
+
}
|
|
17
|
+
/** 是否包含`;` */
|
|
18
|
+
get dt() {
|
|
19
|
+
return this.innerText.includes(';');
|
|
20
|
+
}
|
|
21
|
+
/** 是否包含`*` */
|
|
22
|
+
get ul() {
|
|
23
|
+
return this.innerText.includes('*');
|
|
24
|
+
}
|
|
25
|
+
/** 是否包含`#` */
|
|
26
|
+
get ol() {
|
|
27
|
+
return this.innerText.includes('#');
|
|
28
|
+
}
|
|
29
|
+
/** 获取列表行的范围 */
|
|
30
|
+
getRange() {
|
|
31
|
+
let { nextSibling } = this;
|
|
32
|
+
if (nextSibling?.type === 'list-range') {
|
|
33
|
+
return nextSibling;
|
|
34
|
+
}
|
|
35
|
+
const { dt, type } = this;
|
|
36
|
+
let nDt = 0;
|
|
37
|
+
while (nextSibling && (nextSibling.type !== 'text' || !nextSibling.data.includes('\n'))) {
|
|
38
|
+
if (type === 'list') {
|
|
39
|
+
if (nextSibling.is('dd')) {
|
|
40
|
+
nDt -= nextSibling.indent;
|
|
41
|
+
if (dt && nDt < 0) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else if (nextSibling.is('list') && nextSibling.dt) {
|
|
46
|
+
nDt++;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else if (nextSibling.type === 'dd') {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
({ nextSibling } = nextSibling);
|
|
53
|
+
}
|
|
54
|
+
const range = this.createRange();
|
|
55
|
+
if (nextSibling && nextSibling.type !== 'text') {
|
|
56
|
+
range.setStartAfter(this);
|
|
57
|
+
range.setEndBefore(nextSibling);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const { parentNode } = this;
|
|
61
|
+
if (type === 'list') {
|
|
62
|
+
while (this.previousSibling?.is('list')) {
|
|
63
|
+
this.setText(this.previousSibling.innerText + this.innerText);
|
|
64
|
+
this.previousSibling.remove();
|
|
65
|
+
}
|
|
66
|
+
for (let i = 0; i < nDt; i++) {
|
|
67
|
+
const token = this.nextSibling;
|
|
68
|
+
this.setText(this.innerText + token.innerText);
|
|
69
|
+
token.remove();
|
|
70
|
+
}
|
|
71
|
+
if (parentNode?.is('list-range')) {
|
|
72
|
+
parentNode.previousSibling.setText(parentNode.previousSibling.innerText + this.innerText);
|
|
73
|
+
this.remove();
|
|
74
|
+
return parentNode;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
range.setStartAfter(this);
|
|
78
|
+
if (nextSibling) {
|
|
79
|
+
range.setEnd(nextSibling, nextSibling.data.indexOf('\n'));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
range.setEnd(parentNode, parentNode.length);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const token = debug_1.Shadow.run(() => {
|
|
86
|
+
const t = new index_1.Token(undefined, this.getAttribute('config'));
|
|
87
|
+
t.type = 'list-range';
|
|
88
|
+
return t;
|
|
89
|
+
});
|
|
90
|
+
token.append(...range.extractContents());
|
|
91
|
+
range.insertNode(token);
|
|
92
|
+
return token;
|
|
93
|
+
}
|
|
94
|
+
/** @private */
|
|
95
|
+
toHtmlInternal() {
|
|
96
|
+
return '';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.ListBaseToken = ListBaseToken;
|
|
100
|
+
constants_1.classes['ListBaseToken'] = __filename;
|