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