1 | var __extends = (this && this.__extends) || (function () {
|
2 | var extendStatics = function (d, b) {
|
3 | extendStatics = Object.setPrototypeOf ||
|
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6 | return extendStatics(d, b);
|
7 | };
|
8 | return function (d, b) {
|
9 | extendStatics(d, b);
|
10 | function __() { this.constructor = d; }
|
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
12 | };
|
13 | })();
|
14 | import { DocNodeKind, DocNode } from './DocNode';
|
15 | import { DocExcerpt, ExcerptKind } from './DocExcerpt';
|
16 |
|
17 |
|
18 |
|
19 | export var EscapeStyle;
|
20 | (function (EscapeStyle) {
|
21 | |
22 |
|
23 |
|
24 | EscapeStyle[EscapeStyle["CommonMarkBackslash"] = 0] = "CommonMarkBackslash";
|
25 | })(EscapeStyle || (EscapeStyle = {}));
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | var DocEscapedText = (function (_super) {
|
34 | __extends(DocEscapedText, _super);
|
35 | |
36 |
|
37 |
|
38 |
|
39 | function DocEscapedText(parameters) {
|
40 | var _this = _super.call(this, parameters) || this;
|
41 | _this._escapeStyle = parameters.escapeStyle;
|
42 | _this._encodedTextExcerpt = new DocExcerpt({
|
43 | configuration: _this.configuration,
|
44 | excerptKind: ExcerptKind.EscapedText,
|
45 | content: parameters.encodedTextExcerpt
|
46 | });
|
47 | _this._decodedText = parameters.decodedText;
|
48 | return _this;
|
49 | }
|
50 | Object.defineProperty(DocEscapedText.prototype, "kind", {
|
51 |
|
52 | get: function () {
|
53 | return DocNodeKind.EscapedText;
|
54 | },
|
55 | enumerable: false,
|
56 | configurable: true
|
57 | });
|
58 | Object.defineProperty(DocEscapedText.prototype, "escapeStyle", {
|
59 | |
60 |
|
61 |
|
62 | get: function () {
|
63 | return this._escapeStyle;
|
64 | },
|
65 | enumerable: false,
|
66 | configurable: true
|
67 | });
|
68 | Object.defineProperty(DocEscapedText.prototype, "encodedText", {
|
69 | |
70 |
|
71 |
|
72 | get: function () {
|
73 | if (this._encodedText === undefined) {
|
74 | this._encodedText = this._encodedTextExcerpt.content.toString();
|
75 | }
|
76 | return this._encodedText;
|
77 | },
|
78 | enumerable: false,
|
79 | configurable: true
|
80 | });
|
81 | Object.defineProperty(DocEscapedText.prototype, "decodedText", {
|
82 | |
83 |
|
84 |
|
85 | get: function () {
|
86 | return this._decodedText;
|
87 | },
|
88 | enumerable: false,
|
89 | configurable: true
|
90 | });
|
91 |
|
92 | DocEscapedText.prototype.onGetChildNodes = function () {
|
93 | return [this._encodedTextExcerpt];
|
94 | };
|
95 | return DocEscapedText;
|
96 | }(DocNode));
|
97 | export { DocEscapedText };
|
98 |
|
\ | No newline at end of file |