@gmb/bitmark-parser-generator 3.26.0 → 3.28.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/README.md +4 -4
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/BitmarkParserGenerator.js +19 -16
- package/dist/cjs/BitmarkParserGenerator.js.map +1 -1
- package/dist/cjs/ast/BaseBuilder.js +8 -8
- package/dist/cjs/ast/BaseBuilder.js.map +1 -1
- package/dist/cjs/ast/Builder.js +52 -50
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/ast/ResourceBuilder.js +19 -18
- package/dist/cjs/ast/ResourceBuilder.js.map +1 -1
- package/dist/cjs/breakscaping/Breakscape.js +59 -72
- package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
- package/dist/cjs/config/Config.js +1 -1
- package/dist/cjs/config/Config.js.map +1 -1
- package/dist/cjs/config/raw/bits.js +26 -9
- package/dist/cjs/config/raw/bits.js.map +1 -1
- package/dist/cjs/config/raw/groups.js +5 -0
- package/dist/cjs/config/raw/groups.js.map +1 -1
- package/dist/cjs/config/raw/properties.js +145 -141
- package/dist/cjs/config/raw/properties.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +116 -128
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/cjs/generator/json/JsonGenerator.js +10 -10
- package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
- package/dist/cjs/generator/text/TextGenerator.js +15 -15
- package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model/ast/NodeType.js +2 -0
- package/dist/cjs/model/ast/NodeType.js.map +1 -1
- package/dist/cjs/model/config/enum/PropertyConfigKey.js +1 -0
- package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
- package/dist/cjs/model/enum/BitType.js +3 -0
- package/dist/cjs/model/enum/BitType.js.map +1 -1
- package/dist/cjs/model/enum/BodyTextFormat.js +14 -0
- package/dist/cjs/model/enum/BodyTextFormat.js.map +1 -0
- package/dist/cjs/model/enum/DeprecatedTextFormat.js +9 -0
- package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +1 -0
- package/dist/cjs/model/enum/PropertyFormat.js +2 -4
- package/dist/cjs/model/enum/PropertyFormat.js.map +1 -1
- package/dist/cjs/model/enum/TextFormat.js +4 -15
- package/dist/cjs/model/enum/TextFormat.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +2 -2
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +14 -10
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +4 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +8 -8
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +3 -3
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +2 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +10 -16
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +2 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +2 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/json/JsonParser.js +4 -3
- package/dist/cjs/parser/json/JsonParser.js.map +1 -1
- package/dist/cjs/parser/text/TextParser.js +4 -4
- package/dist/cjs/parser/text/TextParser.js.map +1 -1
- package/dist/cjs/utils/BitUtils.js +2 -1
- package/dist/cjs/utils/BitUtils.js.map +1 -1
- package/dist/esm/BitmarkParserGenerator.js +19 -16
- package/dist/esm/BitmarkParserGenerator.js.map +1 -1
- package/dist/esm/ast/BaseBuilder.js +8 -8
- package/dist/esm/ast/BaseBuilder.js.map +1 -1
- package/dist/esm/ast/Builder.js +52 -50
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/ast/ResourceBuilder.js +19 -18
- package/dist/esm/ast/ResourceBuilder.js.map +1 -1
- package/dist/esm/breakscaping/Breakscape.js +59 -72
- package/dist/esm/breakscaping/Breakscape.js.map +1 -1
- package/dist/esm/config/Config.js +1 -1
- package/dist/esm/config/Config.js.map +1 -1
- package/dist/esm/config/raw/bits.js +26 -9
- package/dist/esm/config/raw/bits.js.map +1 -1
- package/dist/esm/config/raw/groups.js +5 -0
- package/dist/esm/config/raw/groups.js.map +1 -1
- package/dist/esm/config/raw/properties.js +145 -141
- package/dist/esm/config/raw/properties.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +116 -128
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/esm/generator/json/JsonGenerator.js +10 -10
- package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
- package/dist/esm/generator/text/TextGenerator.js +15 -15
- package/dist/esm/generator/text/TextGenerator.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model/ast/NodeType.js +2 -0
- package/dist/esm/model/ast/NodeType.js.map +1 -1
- package/dist/esm/model/config/enum/PropertyConfigKey.js +1 -0
- package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
- package/dist/esm/model/enum/BitType.js +3 -0
- package/dist/esm/model/enum/BitType.js.map +1 -1
- package/dist/esm/model/enum/BodyTextFormat.js +11 -0
- package/dist/esm/model/enum/BodyTextFormat.js.map +1 -0
- package/dist/esm/model/enum/DeprecatedTextFormat.js +6 -0
- package/dist/esm/model/enum/DeprecatedTextFormat.js.map +1 -0
- package/dist/esm/model/enum/PropertyFormat.js +2 -4
- package/dist/esm/model/enum/PropertyFormat.js.map +1 -1
- package/dist/esm/model/enum/TextFormat.js +4 -15
- package/dist/esm/model/enum/TextFormat.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +2 -2
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +14 -10
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +4 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +8 -8
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +3 -3
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +2 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +10 -16
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +2 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +2 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/json/JsonParser.js +4 -3
- package/dist/esm/parser/json/JsonParser.js.map +1 -1
- package/dist/esm/parser/text/TextParser.js +4 -4
- package/dist/esm/parser/text/TextParser.js.map +1 -1
- package/dist/esm/utils/BitUtils.js +2 -1
- package/dist/esm/utils/BitUtils.js.map +1 -1
- package/dist/types/BitmarkParserGenerator.d.ts +12 -8
- package/dist/types/BitmarkParserGenerator.d.ts.map +1 -1
- package/dist/types/ast/BaseBuilder.d.ts +5 -3
- package/dist/types/ast/BaseBuilder.d.ts.map +1 -1
- package/dist/types/ast/Builder.d.ts +1 -0
- package/dist/types/ast/Builder.d.ts.map +1 -1
- package/dist/types/ast/ResourceBuilder.d.ts.map +1 -1
- package/dist/types/breakscaping/Breakscape.d.ts +2 -2
- package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
- package/dist/types/config/raw/bits.d.ts.map +1 -1
- package/dist/types/config/raw/groups.d.ts.map +1 -1
- package/dist/types/config/raw/properties.d.ts.map +1 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +2 -2
- package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
- package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/model/ast/NodeType.d.ts +4 -0
- package/dist/types/model/ast/NodeType.d.ts.map +1 -1
- package/dist/types/model/ast/Nodes.d.ts +1 -0
- package/dist/types/model/ast/Nodes.d.ts.map +1 -1
- package/dist/types/model/config/enum/ConfigKey.d.ts +2 -0
- package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts +3 -0
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
- package/dist/types/model/enum/BitType.d.ts +6 -0
- package/dist/types/model/enum/BitType.d.ts.map +1 -1
- package/dist/types/model/enum/BodyTextFormat.d.ts +17 -0
- package/dist/types/model/enum/BodyTextFormat.d.ts.map +1 -0
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts +7 -0
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +1 -0
- package/dist/types/model/enum/PropertyFormat.d.ts +4 -6
- package/dist/types/model/enum/PropertyFormat.d.ts.map +1 -1
- package/dist/types/model/enum/PropertyTag.d.ts +2 -0
- package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
- package/dist/types/model/enum/TextFormat.d.ts +4 -6
- package/dist/types/model/enum/TextFormat.d.ts.map +1 -1
- package/dist/types/model/json/BitJson.d.ts +1 -0
- package/dist/types/model/json/BitJson.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
- package/dist/types/parser/text/TextParser.d.ts +2 -1
- package/dist/types/parser/text/TextParser.d.ts.map +1 -1
- package/dist/types/utils/BitUtils.d.ts.map +1 -1
- package/package.json +25 -21
|
@@ -62,8 +62,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
62
62
|
this.ast = new Ast_1.Ast();
|
|
63
63
|
// State
|
|
64
64
|
this.bitType = BitType_1.BitType._error;
|
|
65
|
-
this.textFormat = TextFormat_1.TextFormat.
|
|
66
|
-
this.tagTextFormat = TextFormat_1.TextFormat.bitmarkMinusMinus;
|
|
65
|
+
this.textFormat = TextFormat_1.TextFormat.bitmarkText;
|
|
67
66
|
this.isBodyBitmarkText = false;
|
|
68
67
|
this.isCardAllowed = false;
|
|
69
68
|
this.firstBit = true;
|
|
@@ -147,8 +146,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
147
146
|
}
|
|
148
147
|
resetState() {
|
|
149
148
|
this.bitType = BitType_1.BitType._error;
|
|
150
|
-
this.textFormat = TextFormat_1.TextFormat.
|
|
151
|
-
this.tagTextFormat = TextFormat_1.TextFormat.bitmarkMinusMinus;
|
|
149
|
+
this.textFormat = TextFormat_1.TextFormat.bitmarkText;
|
|
152
150
|
this.isBodyBitmarkText = false;
|
|
153
151
|
this.isCardAllowed = false;
|
|
154
152
|
this.firstBit = true;
|
|
@@ -179,17 +177,8 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
179
177
|
// Set state variables
|
|
180
178
|
this.bitType = bit.bitType;
|
|
181
179
|
this.textFormat = (_a = bit.textFormat) !== null && _a !== void 0 ? _a : bitConfig.textFormatDefault;
|
|
182
|
-
this.isBodyBitmarkText =
|
|
183
|
-
this.textFormat === TextFormat_1.TextFormat.bitmarkMinusMinus || this.textFormat === TextFormat_1.TextFormat.bitmarkPlusPlus;
|
|
180
|
+
this.isBodyBitmarkText = this.textFormat === TextFormat_1.TextFormat.bitmarkText;
|
|
184
181
|
this.isCardAllowed = this.calculateIsCardAllowed();
|
|
185
|
-
// NOTE:
|
|
186
|
-
// If the bit text format is bitmark++ then the tagTextFormat should be bitmark+, but that is not implemented yet.
|
|
187
|
-
// It works anyhow, and would require a lot of changes to implement.
|
|
188
|
-
// Since this may well change in the future, we will keep the code as is for now.
|
|
189
|
-
this.tagTextFormat =
|
|
190
|
-
this.textFormat === TextFormat_1.TextFormat.bitmarkPlusPlus
|
|
191
|
-
? TextFormat_1.TextFormat.bitmarkPlusPlus // NOTE: should be bitmarkPlus
|
|
192
|
-
: TextFormat_1.TextFormat.bitmarkMinusMinus;
|
|
193
182
|
this.hasCardSet = this.haveValidCardSet(bit);
|
|
194
183
|
this.hasFooter = this.haveValidFooter(bit);
|
|
195
184
|
// Separate the bits with 3 newlines
|
|
@@ -251,7 +240,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
251
240
|
const comment = internalComment[i];
|
|
252
241
|
this.writeNL();
|
|
253
242
|
this.writeProperty('internalComment', comment, {
|
|
254
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
243
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
255
244
|
single: false,
|
|
256
245
|
ignoreEmpty: true,
|
|
257
246
|
});
|
|
@@ -275,13 +264,13 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
275
264
|
}
|
|
276
265
|
if (haveTrue)
|
|
277
266
|
this.writeProperty(PropertyTag_1.PropertyTag.labelTrue, value, {
|
|
278
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
267
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
279
268
|
single: true,
|
|
280
269
|
ignoreEmpty: true,
|
|
281
270
|
});
|
|
282
271
|
if (haveFalse)
|
|
283
272
|
this.writeProperty(PropertyTag_1.PropertyTag.labelFalse, bit.labelFalse, {
|
|
284
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
273
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
285
274
|
single: true,
|
|
286
275
|
ignoreEmpty: true,
|
|
287
276
|
});
|
|
@@ -303,32 +292,32 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
303
292
|
const { url, mockupId, size, format, trim } = imageSource;
|
|
304
293
|
this.writeNL();
|
|
305
294
|
this.writeProperty('imageSource', url, {
|
|
306
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
295
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
307
296
|
single: true,
|
|
308
297
|
ignoreEmpty: true,
|
|
309
298
|
});
|
|
310
299
|
if (url) {
|
|
311
300
|
if (mockupId)
|
|
312
301
|
this.writeProperty('mockupId', mockupId, {
|
|
313
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
302
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
314
303
|
single: true,
|
|
315
304
|
ignoreEmpty: true,
|
|
316
305
|
});
|
|
317
306
|
if (size)
|
|
318
307
|
this.writeProperty('size', size, {
|
|
319
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
308
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
320
309
|
single: true,
|
|
321
310
|
ignoreEmpty: true,
|
|
322
311
|
});
|
|
323
312
|
if (format)
|
|
324
313
|
this.writeProperty('format', format, {
|
|
325
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
314
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
326
315
|
single: true,
|
|
327
316
|
ignoreEmpty: true,
|
|
328
317
|
});
|
|
329
318
|
if (BooleanUtils_1.BooleanUtils.isBoolean(trim))
|
|
330
319
|
this.writeProperty('trim', trim, {
|
|
331
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
320
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
332
321
|
single: true,
|
|
333
322
|
ignoreEmpty: true,
|
|
334
323
|
});
|
|
@@ -346,13 +335,13 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
346
335
|
const { technicalTerm, lang } = nodeValue;
|
|
347
336
|
this.writeNL();
|
|
348
337
|
this.writeProperty('technicalTerm', technicalTerm, {
|
|
349
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
338
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
350
339
|
single: true,
|
|
351
340
|
ignoreEmpty: true,
|
|
352
341
|
});
|
|
353
342
|
if (lang != null) {
|
|
354
343
|
this.writeProperty('lang', lang, {
|
|
355
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
344
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
356
345
|
single: true,
|
|
357
346
|
ignoreEmpty: true,
|
|
358
347
|
});
|
|
@@ -370,41 +359,41 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
370
359
|
const { servings, unit, unitAbbr, decimalPlaces, disableCalculation, hint } = nodeValue;
|
|
371
360
|
this.writeNL();
|
|
372
361
|
this.writeProperty('servings', servings, {
|
|
373
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
362
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
374
363
|
single: true,
|
|
375
364
|
ignoreEmpty: true,
|
|
376
365
|
});
|
|
377
366
|
if (unit != null) {
|
|
378
367
|
this.writeProperty('unit', unit, {
|
|
379
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
368
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
380
369
|
single: true,
|
|
381
370
|
ignoreEmpty: true,
|
|
382
371
|
});
|
|
383
372
|
}
|
|
384
373
|
if (unitAbbr != null) {
|
|
385
374
|
this.writeProperty('unitAbbr', unitAbbr, {
|
|
386
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
375
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
387
376
|
single: true,
|
|
388
377
|
ignoreEmpty: true,
|
|
389
378
|
});
|
|
390
379
|
}
|
|
391
380
|
if (decimalPlaces != null) {
|
|
392
381
|
this.writeProperty('decimalPlaces', decimalPlaces, {
|
|
393
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
382
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
394
383
|
single: true,
|
|
395
384
|
ignoreEmpty: true,
|
|
396
385
|
});
|
|
397
386
|
}
|
|
398
387
|
if (disableCalculation != null) {
|
|
399
388
|
this.writeProperty('disableCalculation', disableCalculation, {
|
|
400
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
389
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
401
390
|
single: true,
|
|
402
391
|
ignoreEmpty: true,
|
|
403
392
|
});
|
|
404
393
|
}
|
|
405
394
|
if (hint != null) {
|
|
406
395
|
this.writeOPQ();
|
|
407
|
-
this.writeTextOrValue(hint, TextFormat_1.TextFormat.
|
|
396
|
+
this.writeTextOrValue(hint, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
408
397
|
this.writeCL();
|
|
409
398
|
}
|
|
410
399
|
return false;
|
|
@@ -419,13 +408,13 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
419
408
|
const { name, title, avatarImage } = person;
|
|
420
409
|
this.writeNL();
|
|
421
410
|
this.writeProperty('person', name, {
|
|
422
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
411
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
423
412
|
single: true,
|
|
424
413
|
ignoreEmpty: true,
|
|
425
414
|
});
|
|
426
415
|
if (title) {
|
|
427
416
|
this.writeProperty('title', title, {
|
|
428
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
417
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
429
418
|
single: true,
|
|
430
419
|
ignoreEmpty: true,
|
|
431
420
|
});
|
|
@@ -509,7 +498,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
509
498
|
// Handle as a standard icon property
|
|
510
499
|
this.writeNL();
|
|
511
500
|
this.writeProperty('icon', node.value, {
|
|
512
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
501
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
513
502
|
single: true,
|
|
514
503
|
ignoreEmpty: true,
|
|
515
504
|
});
|
|
@@ -539,13 +528,13 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
539
528
|
const levelKey = node.key === NodeType_1.NodeType.ratingLevelStart ? PropertyTag_1.PropertyTag.ratingLevelStart : PropertyTag_1.PropertyTag.ratingLevelEnd;
|
|
540
529
|
this.writeNL();
|
|
541
530
|
this.writeProperty(levelKey, level, {
|
|
542
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
531
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
543
532
|
single: true,
|
|
544
533
|
ignoreEmpty: true,
|
|
545
534
|
});
|
|
546
535
|
if (label) {
|
|
547
536
|
this.writeProperty('label', label, {
|
|
548
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
537
|
+
format: PropertyFormat_1.PropertyFormat.bitmarkText,
|
|
549
538
|
single: true,
|
|
550
539
|
ignoreEmpty: true,
|
|
551
540
|
});
|
|
@@ -569,20 +558,20 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
569
558
|
if (mark) {
|
|
570
559
|
this.writeNL();
|
|
571
560
|
this.writeProperty('mark', mark, {
|
|
572
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
561
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
573
562
|
single: true,
|
|
574
563
|
ignoreEmpty: true,
|
|
575
564
|
});
|
|
576
565
|
if (color) {
|
|
577
566
|
this.writeProperty('color', color, {
|
|
578
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
567
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
579
568
|
single: true,
|
|
580
569
|
ignoreEmpty: true,
|
|
581
570
|
});
|
|
582
571
|
}
|
|
583
572
|
if (emphasis) {
|
|
584
573
|
this.writeProperty('emphasis', emphasis, {
|
|
585
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
574
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
586
575
|
single: true,
|
|
587
576
|
ignoreEmpty: true,
|
|
588
577
|
});
|
|
@@ -596,7 +585,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
596
585
|
if (node.value) {
|
|
597
586
|
this.writeNL();
|
|
598
587
|
this.writeProperty('partialAnswer', node.value, {
|
|
599
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
588
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
600
589
|
single: true,
|
|
601
590
|
ignoreEmpty: true,
|
|
602
591
|
});
|
|
@@ -609,7 +598,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
609
598
|
if (node.value) {
|
|
610
599
|
this.writeNL();
|
|
611
600
|
this.writeProperty('partialAnswer', node.value, {
|
|
612
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
601
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
613
602
|
single: true,
|
|
614
603
|
ignoreEmpty: true,
|
|
615
604
|
});
|
|
@@ -623,7 +612,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
623
612
|
if (node.value) {
|
|
624
613
|
this.writeNL();
|
|
625
614
|
this.writeProperty('sampleSolution', node.value, {
|
|
626
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
615
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
627
616
|
single: true,
|
|
628
617
|
ignoreEmpty: true,
|
|
629
618
|
});
|
|
@@ -635,7 +624,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
635
624
|
if (node.value) {
|
|
636
625
|
this.writeNL();
|
|
637
626
|
this.writeProperty('sampleSolution', node.value, {
|
|
638
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
627
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
639
628
|
single: true,
|
|
640
629
|
ignoreEmpty: true,
|
|
641
630
|
});
|
|
@@ -648,7 +637,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
648
637
|
leaf_reasonableNumOfChars(node, _route) {
|
|
649
638
|
this.writeNL();
|
|
650
639
|
this.writeProperty('reasonableNumOfChars', node.value, {
|
|
651
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
640
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
652
641
|
single: true,
|
|
653
642
|
ignoreEmpty: true,
|
|
654
643
|
});
|
|
@@ -661,7 +650,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
661
650
|
return;
|
|
662
651
|
this.writeNL();
|
|
663
652
|
this.writeProperty('additionalSolutions', node.value, {
|
|
664
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
653
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
665
654
|
single: false,
|
|
666
655
|
});
|
|
667
656
|
}
|
|
@@ -680,7 +669,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
680
669
|
return true; // Will be handled by marginNumber
|
|
681
670
|
this.writeNL_IfNotChain(route);
|
|
682
671
|
this.writeOPC();
|
|
683
|
-
this.writeTextOrValue(item,
|
|
672
|
+
this.writeTextOrValue(item, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
684
673
|
this.writeCL();
|
|
685
674
|
return true;
|
|
686
675
|
}
|
|
@@ -697,10 +686,10 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
697
686
|
return true; // Will be handled by marginNumber
|
|
698
687
|
this.writeNL_IfNotChain(route);
|
|
699
688
|
this.writeOPC();
|
|
700
|
-
this.writeTextOrValue((_d = (_c = parent === null || parent === void 0 ? void 0 : parent.value) === null || _c === void 0 ? void 0 : _c.item) !== null && _d !== void 0 ? _d : '',
|
|
689
|
+
this.writeTextOrValue((_d = (_c = parent === null || parent === void 0 ? void 0 : parent.value) === null || _c === void 0 ? void 0 : _c.item) !== null && _d !== void 0 ? _d : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
701
690
|
this.writeCL();
|
|
702
691
|
this.writeOPC();
|
|
703
|
-
this.writeTextOrValue(lead,
|
|
692
|
+
this.writeTextOrValue(lead, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
704
693
|
this.writeCL();
|
|
705
694
|
return true;
|
|
706
695
|
}
|
|
@@ -715,13 +704,13 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
715
704
|
return true; // Will be handled by marginNumber
|
|
716
705
|
this.writeNL_IfNotChain(route);
|
|
717
706
|
this.writeOPC();
|
|
718
|
-
this.writeTextOrValue((_c = (_b = parent === null || parent === void 0 ? void 0 : parent.value) === null || _b === void 0 ? void 0 : _b.item) !== null && _c !== void 0 ? _c : '',
|
|
707
|
+
this.writeTextOrValue((_c = (_b = parent === null || parent === void 0 ? void 0 : parent.value) === null || _b === void 0 ? void 0 : _b.item) !== null && _c !== void 0 ? _c : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
719
708
|
this.writeCL();
|
|
720
709
|
this.writeOPC();
|
|
721
|
-
this.writeTextOrValue((_e = (_d = parent === null || parent === void 0 ? void 0 : parent.value) === null || _d === void 0 ? void 0 : _d.lead) !== null && _e !== void 0 ? _e : '',
|
|
710
|
+
this.writeTextOrValue((_e = (_d = parent === null || parent === void 0 ? void 0 : parent.value) === null || _d === void 0 ? void 0 : _d.lead) !== null && _e !== void 0 ? _e : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
722
711
|
this.writeCL();
|
|
723
712
|
this.writeOPC();
|
|
724
|
-
this.writeTextOrValue(pageNumber !== null && pageNumber !== void 0 ? pageNumber : '',
|
|
713
|
+
this.writeTextOrValue(pageNumber !== null && pageNumber !== void 0 ? pageNumber : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
725
714
|
this.writeCL();
|
|
726
715
|
return true;
|
|
727
716
|
}
|
|
@@ -734,16 +723,16 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
734
723
|
return false; // Ignore empty
|
|
735
724
|
this.writeNL_IfNotChain(route);
|
|
736
725
|
this.writeOPC();
|
|
737
|
-
this.writeTextOrValue((_b = (_a = parent === null || parent === void 0 ? void 0 : parent.value) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : '',
|
|
726
|
+
this.writeTextOrValue((_b = (_a = parent === null || parent === void 0 ? void 0 : parent.value) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
738
727
|
this.writeCL();
|
|
739
728
|
this.writeOPC();
|
|
740
|
-
this.writeTextOrValue((_d = (_c = parent === null || parent === void 0 ? void 0 : parent.value) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : '',
|
|
729
|
+
this.writeTextOrValue((_d = (_c = parent === null || parent === void 0 ? void 0 : parent.value) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
741
730
|
this.writeCL();
|
|
742
731
|
this.writeOPC();
|
|
743
|
-
this.writeTextOrValue((_f = (_e = parent === null || parent === void 0 ? void 0 : parent.value) === null || _e === void 0 ? void 0 : _e.pageNumber) !== null && _f !== void 0 ? _f : '',
|
|
732
|
+
this.writeTextOrValue((_f = (_e = parent === null || parent === void 0 ? void 0 : parent.value) === null || _e === void 0 ? void 0 : _e.pageNumber) !== null && _f !== void 0 ? _f : '', TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
744
733
|
this.writeCL();
|
|
745
734
|
this.writeOPC();
|
|
746
|
-
this.writeTextOrValue(marginNumber,
|
|
735
|
+
this.writeTextOrValue(marginNumber, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
747
736
|
this.writeCL();
|
|
748
737
|
return true;
|
|
749
738
|
}
|
|
@@ -765,7 +754,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
765
754
|
if (text) {
|
|
766
755
|
this.writePlainTextDivider();
|
|
767
756
|
this.writeNL();
|
|
768
|
-
this.writeTextOrValue(text, TextFormat_1.TextFormat.
|
|
757
|
+
this.writeTextOrValue(text, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.body);
|
|
769
758
|
}
|
|
770
759
|
}
|
|
771
760
|
}
|
|
@@ -784,7 +773,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
784
773
|
this.writePlainTextDivider();
|
|
785
774
|
this.writeNL();
|
|
786
775
|
const s = (StringUtils_1.StringUtils.isString(body.body) ? body.body : '');
|
|
787
|
-
this.writeTextOrValue(`${s}`, TextFormat_1.TextFormat.
|
|
776
|
+
this.writeTextOrValue(`${s}`, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.body);
|
|
788
777
|
}
|
|
789
778
|
// Stop traversal of this branch
|
|
790
779
|
return false;
|
|
@@ -811,7 +800,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
811
800
|
else {
|
|
812
801
|
for (const solution of gap.solutions) {
|
|
813
802
|
this.writeOPU();
|
|
814
|
-
this.writeTextOrValue(solution, TextFormat_1.TextFormat.
|
|
803
|
+
this.writeTextOrValue(solution, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
815
804
|
this.writeCL();
|
|
816
805
|
}
|
|
817
806
|
}
|
|
@@ -822,7 +811,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
822
811
|
enter_mark(node, _route) {
|
|
823
812
|
const mark = node.value;
|
|
824
813
|
this.writeOPE();
|
|
825
|
-
this.writeTextOrValue(mark.solution, TextFormat_1.TextFormat.
|
|
814
|
+
this.writeTextOrValue(mark.solution, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
826
815
|
this.writeCL();
|
|
827
816
|
// Continue traversal
|
|
828
817
|
return true;
|
|
@@ -852,7 +841,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
852
841
|
if (this.isBodyBitmarkText) {
|
|
853
842
|
// handle bitmark text
|
|
854
843
|
this.writeNL();
|
|
855
|
-
this.writeTextOrValue('==== footer ====', TextFormat_1.TextFormat.
|
|
844
|
+
this.writeTextOrValue('==== footer ====', TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.body);
|
|
856
845
|
this.writeNL();
|
|
857
846
|
// The text generator will write to the writer
|
|
858
847
|
this.writeTextOrValue(footer.footer, this.textFormat, TextLocation_1.TextLocation.body, {
|
|
@@ -894,7 +883,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
894
883
|
return;
|
|
895
884
|
if (solution) {
|
|
896
885
|
this.writeOPE();
|
|
897
|
-
this.writeTextOrValue(solution, TextFormat_1.TextFormat.
|
|
886
|
+
this.writeTextOrValue(solution, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
898
887
|
this.writeCL();
|
|
899
888
|
}
|
|
900
889
|
}
|
|
@@ -906,7 +895,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
906
895
|
const mark = node.value;
|
|
907
896
|
if (mark) {
|
|
908
897
|
this.writeProperty('mark', mark, {
|
|
909
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
898
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
910
899
|
single: true,
|
|
911
900
|
ignoreEmpty: true,
|
|
912
901
|
});
|
|
@@ -921,7 +910,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
921
910
|
else {
|
|
922
911
|
this.writeOPM();
|
|
923
912
|
}
|
|
924
|
-
this.writeTextOrValue(selectOption.text, TextFormat_1.TextFormat.
|
|
913
|
+
this.writeTextOrValue(selectOption.text, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
925
914
|
this.writeCL();
|
|
926
915
|
// Continue traversal
|
|
927
916
|
return true;
|
|
@@ -935,7 +924,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
935
924
|
else {
|
|
936
925
|
this.writeOPM();
|
|
937
926
|
}
|
|
938
|
-
this.writeTextOrValue(highlightText.text, TextFormat_1.TextFormat.
|
|
927
|
+
this.writeTextOrValue(highlightText.text, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
939
928
|
this.writeCL();
|
|
940
929
|
// Continue traversal
|
|
941
930
|
return true;
|
|
@@ -1016,7 +1005,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1016
1005
|
else {
|
|
1017
1006
|
this.writeOPM();
|
|
1018
1007
|
}
|
|
1019
|
-
this.writeTextOrValue(statement.statement, TextFormat_1.TextFormat.
|
|
1008
|
+
this.writeTextOrValue(statement.statement, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1020
1009
|
this.writeCL();
|
|
1021
1010
|
// Continue traversal
|
|
1022
1011
|
return true;
|
|
@@ -1033,7 +1022,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1033
1022
|
else {
|
|
1034
1023
|
this.writeOPM();
|
|
1035
1024
|
}
|
|
1036
|
-
this.writeTextOrValue(choice.choice, TextFormat_1.TextFormat.
|
|
1025
|
+
this.writeTextOrValue(choice.choice, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1037
1026
|
this.writeCL();
|
|
1038
1027
|
// Continue traversal
|
|
1039
1028
|
return true;
|
|
@@ -1049,7 +1038,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1049
1038
|
else {
|
|
1050
1039
|
this.writeOPM();
|
|
1051
1040
|
}
|
|
1052
|
-
this.writeTextOrValue(response.response, TextFormat_1.TextFormat.
|
|
1041
|
+
this.writeTextOrValue(response.response, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1053
1042
|
this.writeCL();
|
|
1054
1043
|
// Continue traversal
|
|
1055
1044
|
return true;
|
|
@@ -1182,13 +1171,13 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1182
1171
|
leaf_columnsValue(node, _route) {
|
|
1183
1172
|
this.writeNL();
|
|
1184
1173
|
this.writeOPHASH();
|
|
1185
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1174
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1186
1175
|
this.writeCL();
|
|
1187
1176
|
}
|
|
1188
1177
|
enter_columnsValue(node, _route) {
|
|
1189
1178
|
this.writeNL();
|
|
1190
1179
|
this.writeOPHASH();
|
|
1191
|
-
this.writeTextOrValue(node.value,
|
|
1180
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1192
1181
|
this.writeCL();
|
|
1193
1182
|
}
|
|
1194
1183
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data -> dataValue
|
|
@@ -1224,7 +1213,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1224
1213
|
this.writeNL();
|
|
1225
1214
|
this.writeOP();
|
|
1226
1215
|
this.writeHash();
|
|
1227
|
-
this.writeTextOrValue(cell.title,
|
|
1216
|
+
this.writeTextOrValue(cell.title, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1228
1217
|
this.writeCL();
|
|
1229
1218
|
}
|
|
1230
1219
|
if (cell.audio) {
|
|
@@ -1320,7 +1309,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1320
1309
|
if (ingredient.title != null) {
|
|
1321
1310
|
this.writeNL();
|
|
1322
1311
|
this.writeOPHASH();
|
|
1323
|
-
this.writeTextOrValue(ingredient.title, TextFormat_1.TextFormat.
|
|
1312
|
+
this.writeTextOrValue(ingredient.title, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1324
1313
|
this.writeCL();
|
|
1325
1314
|
// this.writeNL();
|
|
1326
1315
|
}
|
|
@@ -1336,34 +1325,34 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1336
1325
|
// [!43]
|
|
1337
1326
|
if (ingredient.quantity != null) {
|
|
1338
1327
|
this.writeOPB();
|
|
1339
|
-
this.writeTextOrValue(`${ingredient.quantity}`, TextFormat_1.TextFormat.
|
|
1328
|
+
this.writeTextOrValue(`${ingredient.quantity}`, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1340
1329
|
this.writeCL();
|
|
1341
1330
|
}
|
|
1342
1331
|
// [@unit:kilograms]
|
|
1343
1332
|
if (ingredient.unit != null)
|
|
1344
1333
|
this.writeProperty('unit', ingredient.unit, {
|
|
1345
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1334
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1346
1335
|
single: true,
|
|
1347
1336
|
ignoreEmpty: true,
|
|
1348
1337
|
});
|
|
1349
1338
|
// [@unitAbbr:kg]
|
|
1350
1339
|
if (ingredient.unitAbbr != null)
|
|
1351
1340
|
this.writeProperty('unitAbbr', ingredient.unitAbbr, {
|
|
1352
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1341
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1353
1342
|
single: true,
|
|
1354
1343
|
ignoreEmpty: true,
|
|
1355
1344
|
});
|
|
1356
1345
|
// [@decimalPlaces:1]
|
|
1357
1346
|
if (ingredient.decimalPlaces != null)
|
|
1358
1347
|
this.writeProperty('decimalPlaces', ingredient.decimalPlaces, {
|
|
1359
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1348
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1360
1349
|
single: true,
|
|
1361
1350
|
ignoreEmpty: true,
|
|
1362
1351
|
});
|
|
1363
1352
|
// [@disableCalculation]
|
|
1364
1353
|
if (ingredient.disableCalculation)
|
|
1365
1354
|
this.writeProperty('disableCalculation', true, {
|
|
1366
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1355
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1367
1356
|
single: true,
|
|
1368
1357
|
ignoreEmpty: true,
|
|
1369
1358
|
});
|
|
@@ -1396,7 +1385,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1396
1385
|
return;
|
|
1397
1386
|
this.writeNL();
|
|
1398
1387
|
this.writeOPB();
|
|
1399
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1388
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1400
1389
|
this.writeCL();
|
|
1401
1390
|
}
|
|
1402
1391
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses -> botResponsesValue -> reaction
|
|
@@ -1406,7 +1395,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1406
1395
|
return;
|
|
1407
1396
|
this.writeNL();
|
|
1408
1397
|
this.writeProperty('reaction', node.value, {
|
|
1409
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1398
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1410
1399
|
single: true,
|
|
1411
1400
|
ignoreEmpty: true,
|
|
1412
1401
|
});
|
|
@@ -1443,7 +1432,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1443
1432
|
const posterImage = node.value;
|
|
1444
1433
|
if (posterImage) {
|
|
1445
1434
|
this.writeProperty('posterImage', posterImage, {
|
|
1446
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1435
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1447
1436
|
single: true,
|
|
1448
1437
|
ignoreEmpty: true,
|
|
1449
1438
|
});
|
|
@@ -1454,7 +1443,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1454
1443
|
const posterImage = node.value;
|
|
1455
1444
|
if (posterImage && posterImage.src) {
|
|
1456
1445
|
this.writeProperty('posterImage', posterImage.src, {
|
|
1457
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1446
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1458
1447
|
single: true,
|
|
1459
1448
|
ignoreEmpty: true,
|
|
1460
1449
|
});
|
|
@@ -1476,7 +1465,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1476
1465
|
const thumbnail = thumbnails[i];
|
|
1477
1466
|
const key = thumbnailKeys[i];
|
|
1478
1467
|
this.writeProperty(key, thumbnail.src, {
|
|
1479
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1468
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1480
1469
|
single: true,
|
|
1481
1470
|
ignoreEmpty: true,
|
|
1482
1471
|
});
|
|
@@ -1525,7 +1514,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1525
1514
|
this.writeOP();
|
|
1526
1515
|
for (let i = 0; i < +level; i++)
|
|
1527
1516
|
this.writeHash();
|
|
1528
|
-
this.writeTextOrValue(title,
|
|
1517
|
+
this.writeTextOrValue(title, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1529
1518
|
this.writeCL();
|
|
1530
1519
|
}
|
|
1531
1520
|
// Stop traversal of this branch
|
|
@@ -1545,7 +1534,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1545
1534
|
this.writeOP();
|
|
1546
1535
|
for (let i = 0; i < level; i++)
|
|
1547
1536
|
this.writeHash();
|
|
1548
|
-
this.writeTextOrValue(subtitle,
|
|
1537
|
+
this.writeTextOrValue(subtitle, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1549
1538
|
this.writeCL();
|
|
1550
1539
|
}
|
|
1551
1540
|
// Stop traversal of this branch
|
|
@@ -1563,17 +1552,17 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1563
1552
|
if (book) {
|
|
1564
1553
|
this.writeNL();
|
|
1565
1554
|
this.writeProperty('book', book.book, {
|
|
1566
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1555
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1567
1556
|
single: true,
|
|
1568
1557
|
ignoreEmpty: false,
|
|
1569
1558
|
});
|
|
1570
1559
|
if (book.reference) {
|
|
1571
1560
|
this.writeOPRANGLE();
|
|
1572
|
-
this.writeTextOrValue(book.reference, TextFormat_1.TextFormat.
|
|
1561
|
+
this.writeTextOrValue(book.reference, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1573
1562
|
this.writeCL();
|
|
1574
1563
|
if (book.referenceEnd) {
|
|
1575
1564
|
this.writeOPRANGLE();
|
|
1576
|
-
this.writeTextOrValue(book.referenceEnd, TextFormat_1.TextFormat.
|
|
1565
|
+
this.writeTextOrValue(book.referenceEnd, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1577
1566
|
this.writeCL();
|
|
1578
1567
|
}
|
|
1579
1568
|
}
|
|
@@ -1588,17 +1577,17 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1588
1577
|
if (bit && node.value) {
|
|
1589
1578
|
this.writeNL();
|
|
1590
1579
|
this.writeProperty('book', node.value, {
|
|
1591
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1580
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1592
1581
|
single: true,
|
|
1593
1582
|
ignoreEmpty: false,
|
|
1594
1583
|
});
|
|
1595
1584
|
if (bit.reference) {
|
|
1596
1585
|
this.writeOPRANGLE();
|
|
1597
|
-
this.writeTextOrValue(bit.reference, TextFormat_1.TextFormat.
|
|
1586
|
+
this.writeTextOrValue(bit.reference, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1598
1587
|
this.writeCL();
|
|
1599
1588
|
if (bit.referenceEnd) {
|
|
1600
1589
|
this.writeOPRANGLE();
|
|
1601
|
-
this.writeTextOrValue(bit.referenceEnd, TextFormat_1.TextFormat.
|
|
1590
|
+
this.writeTextOrValue(bit.referenceEnd, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1602
1591
|
this.writeCL();
|
|
1603
1592
|
}
|
|
1604
1593
|
}
|
|
@@ -1609,7 +1598,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1609
1598
|
if (node.value) {
|
|
1610
1599
|
this.writeNL();
|
|
1611
1600
|
this.writeOPDANGLE();
|
|
1612
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1601
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1613
1602
|
this.writeCL();
|
|
1614
1603
|
}
|
|
1615
1604
|
}
|
|
@@ -1622,7 +1611,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1622
1611
|
if (!bit.book) {
|
|
1623
1612
|
this.writeNL();
|
|
1624
1613
|
this.writeOPRANGLE();
|
|
1625
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1614
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1626
1615
|
this.writeCL();
|
|
1627
1616
|
}
|
|
1628
1617
|
}
|
|
@@ -1636,7 +1625,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1636
1625
|
if (!this.isEmptyText(text)) {
|
|
1637
1626
|
this.writeNL_IfNotChain(route);
|
|
1638
1627
|
this.writeOPQ();
|
|
1639
|
-
this.writeTextOrValue(text,
|
|
1628
|
+
this.writeTextOrValue(text, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1640
1629
|
this.writeCL();
|
|
1641
1630
|
}
|
|
1642
1631
|
// Stop traversal of this branch
|
|
@@ -1649,7 +1638,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1649
1638
|
if (!this.isEmptyText(text)) {
|
|
1650
1639
|
this.writeNL_IfNotChain(route);
|
|
1651
1640
|
this.writeOPB();
|
|
1652
|
-
this.writeTextOrValue(text,
|
|
1641
|
+
this.writeTextOrValue(text, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1653
1642
|
this.writeCL();
|
|
1654
1643
|
}
|
|
1655
1644
|
// Stop traversal of this branch
|
|
@@ -1672,7 +1661,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1672
1661
|
return;
|
|
1673
1662
|
this.writeNL();
|
|
1674
1663
|
this.writeProperty('refAuthor', node.value, {
|
|
1675
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1664
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1676
1665
|
single: false,
|
|
1677
1666
|
ignoreEmpty: true,
|
|
1678
1667
|
});
|
|
@@ -1683,7 +1672,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1683
1672
|
return;
|
|
1684
1673
|
this.writeNL();
|
|
1685
1674
|
this.writeProperty('refBookTitle', node.value, {
|
|
1686
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1675
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1687
1676
|
single: true,
|
|
1688
1677
|
ignoreEmpty: true,
|
|
1689
1678
|
});
|
|
@@ -1694,7 +1683,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1694
1683
|
return;
|
|
1695
1684
|
this.writeNL();
|
|
1696
1685
|
this.writeProperty('refPublisher', node.value, {
|
|
1697
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1686
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1698
1687
|
single: false,
|
|
1699
1688
|
ignoreEmpty: true,
|
|
1700
1689
|
});
|
|
@@ -1705,7 +1694,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1705
1694
|
return;
|
|
1706
1695
|
this.writeNL();
|
|
1707
1696
|
this.writeProperty('refPublicationYear', node.value, {
|
|
1708
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1697
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1709
1698
|
single: true,
|
|
1710
1699
|
ignoreEmpty: true,
|
|
1711
1700
|
});
|
|
@@ -1716,7 +1705,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1716
1705
|
return;
|
|
1717
1706
|
this.writeNL();
|
|
1718
1707
|
this.writeProperty('citationStyle', node.value, {
|
|
1719
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1708
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1720
1709
|
single: true,
|
|
1721
1710
|
ignoreEmpty: true,
|
|
1722
1711
|
});
|
|
@@ -1744,11 +1733,11 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1744
1733
|
}
|
|
1745
1734
|
else if (Array.isArray(example)) {
|
|
1746
1735
|
// TextAst
|
|
1747
|
-
this.writeTextOrValue(example,
|
|
1736
|
+
this.writeTextOrValue(example, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
1748
1737
|
}
|
|
1749
1738
|
else {
|
|
1750
1739
|
// String
|
|
1751
|
-
this.writeTextOrValue(example, TextFormat_1.TextFormat.
|
|
1740
|
+
this.writeTextOrValue(example, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1752
1741
|
}
|
|
1753
1742
|
this.writeCL();
|
|
1754
1743
|
}
|
|
@@ -1774,7 +1763,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1774
1763
|
return;
|
|
1775
1764
|
if (node.value != null) {
|
|
1776
1765
|
this.writeOPU();
|
|
1777
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1766
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1778
1767
|
this.writeCL();
|
|
1779
1768
|
}
|
|
1780
1769
|
}
|
|
@@ -1783,7 +1772,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1783
1772
|
leaf_prefix(node, _route) {
|
|
1784
1773
|
if (node.value) {
|
|
1785
1774
|
this.writeOPPRE();
|
|
1786
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1775
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1787
1776
|
this.writeCL();
|
|
1788
1777
|
}
|
|
1789
1778
|
}
|
|
@@ -1792,7 +1781,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1792
1781
|
leaf_postfix(node, _route) {
|
|
1793
1782
|
if (node.value) {
|
|
1794
1783
|
this.writeOPPOST();
|
|
1795
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1784
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1796
1785
|
this.writeCL();
|
|
1797
1786
|
}
|
|
1798
1787
|
}
|
|
@@ -1810,21 +1799,21 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1810
1799
|
leaf_forKeys(node, _route) {
|
|
1811
1800
|
this.writeNL();
|
|
1812
1801
|
this.writeOPHASH();
|
|
1813
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1802
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1814
1803
|
this.writeCL();
|
|
1815
1804
|
}
|
|
1816
1805
|
// bitmarkAst -> bits -> bitsValue -> heading -> forValues
|
|
1817
1806
|
leaf_forValues(node, _route) {
|
|
1818
1807
|
this.writeNL();
|
|
1819
1808
|
this.writeOPHASH();
|
|
1820
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1809
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1821
1810
|
this.writeCL();
|
|
1822
1811
|
}
|
|
1823
1812
|
// bitmarkAst -> bits -> bitsValue -> heading -> forValuesValue
|
|
1824
1813
|
leaf_forValuesValue(node, _route) {
|
|
1825
1814
|
this.writeNL();
|
|
1826
1815
|
this.writeOPHASH();
|
|
1827
|
-
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.
|
|
1816
|
+
this.writeTextOrValue(node.value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
1828
1817
|
this.writeCL();
|
|
1829
1818
|
}
|
|
1830
1819
|
// bitmarkAst -> bits -> bitsValue -> pairs -> pairsValue -> key
|
|
@@ -1862,49 +1851,49 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1862
1851
|
// [src1x,src2x,src3x,src4x,width,height,alt,zoomDisabled,caption]
|
|
1863
1852
|
leaf_src1x(node, _route) {
|
|
1864
1853
|
this.writeProperty('src1x', node.value, {
|
|
1865
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1854
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1866
1855
|
single: true,
|
|
1867
1856
|
ignoreEmpty: true,
|
|
1868
1857
|
});
|
|
1869
1858
|
}
|
|
1870
1859
|
leaf_src2x(node, _route) {
|
|
1871
1860
|
this.writeProperty('src2x', node.value, {
|
|
1872
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1861
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1873
1862
|
single: true,
|
|
1874
1863
|
ignoreEmpty: true,
|
|
1875
1864
|
});
|
|
1876
1865
|
}
|
|
1877
1866
|
leaf_src3x(node, _route) {
|
|
1878
1867
|
this.writeProperty('src3x', node.value, {
|
|
1879
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1868
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1880
1869
|
single: true,
|
|
1881
1870
|
ignoreEmpty: true,
|
|
1882
1871
|
});
|
|
1883
1872
|
}
|
|
1884
1873
|
leaf_src4x(node, _route) {
|
|
1885
1874
|
this.writeProperty('src4x', node.value, {
|
|
1886
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1875
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1887
1876
|
single: true,
|
|
1888
1877
|
ignoreEmpty: true,
|
|
1889
1878
|
});
|
|
1890
1879
|
}
|
|
1891
1880
|
leaf_width(node, _route) {
|
|
1892
1881
|
this.writeProperty('width', node.value, {
|
|
1893
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1882
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1894
1883
|
single: true,
|
|
1895
1884
|
ignoreEmpty: true,
|
|
1896
1885
|
});
|
|
1897
1886
|
}
|
|
1898
1887
|
leaf_height(node, _route) {
|
|
1899
1888
|
this.writeProperty('height', node.value, {
|
|
1900
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1889
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1901
1890
|
single: true,
|
|
1902
1891
|
ignoreEmpty: true,
|
|
1903
1892
|
});
|
|
1904
1893
|
}
|
|
1905
1894
|
leaf_alt(node, _route) {
|
|
1906
1895
|
this.writeProperty('alt', node.value, {
|
|
1907
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1896
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1908
1897
|
single: true,
|
|
1909
1898
|
ignoreEmpty: true,
|
|
1910
1899
|
});
|
|
@@ -1934,14 +1923,14 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1934
1923
|
}
|
|
1935
1924
|
leaf_license(node, _route) {
|
|
1936
1925
|
this.writeProperty('license', node.value, {
|
|
1937
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1926
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1938
1927
|
single: true,
|
|
1939
1928
|
ignoreEmpty: true,
|
|
1940
1929
|
});
|
|
1941
1930
|
}
|
|
1942
1931
|
leaf_copyright(node, _route) {
|
|
1943
1932
|
this.writeProperty('copyright', node.value, {
|
|
1944
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1933
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1945
1934
|
single: true,
|
|
1946
1935
|
ignoreEmpty: true,
|
|
1947
1936
|
});
|
|
@@ -1965,7 +1954,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1965
1954
|
const value = node.value;
|
|
1966
1955
|
this.writeNL_IfNotChain(route);
|
|
1967
1956
|
this.writeProperty('caption', value, {
|
|
1968
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1957
|
+
format: PropertyFormat_1.PropertyFormat.bitmarkText,
|
|
1969
1958
|
single: true, // ??
|
|
1970
1959
|
ignoreEmpty: true,
|
|
1971
1960
|
});
|
|
@@ -1978,7 +1967,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1978
1967
|
return;
|
|
1979
1968
|
this.writeNL_IfNotChain(route);
|
|
1980
1969
|
this.writeProperty('search', value, {
|
|
1981
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1970
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1982
1971
|
single: true,
|
|
1983
1972
|
ignoreEmpty: true,
|
|
1984
1973
|
});
|
|
@@ -1993,7 +1982,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
1993
1982
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) === NodeType_1.NodeType.bitsValue)
|
|
1994
1983
|
return;
|
|
1995
1984
|
this.writeProperty('duration', node.value, {
|
|
1996
|
-
format: PropertyFormat_1.PropertyFormat.
|
|
1985
|
+
format: PropertyFormat_1.PropertyFormat.plainText,
|
|
1997
1986
|
single: true,
|
|
1998
1987
|
ignoreEmpty: true,
|
|
1999
1988
|
});
|
|
@@ -2103,7 +2092,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2103
2092
|
// Write the property
|
|
2104
2093
|
this.writeNL_IfNotChain(route); // Only if NOT in chain
|
|
2105
2094
|
this.writeProperty(propertyConfig.tag, node.value, {
|
|
2106
|
-
format: (_a = propertyConfig.format) !== null && _a !== void 0 ? _a : PropertyFormat_1.PropertyFormat.
|
|
2095
|
+
format: (_a = propertyConfig.format) !== null && _a !== void 0 ? _a : PropertyFormat_1.PropertyFormat.plainText,
|
|
2107
2096
|
single: (_b = propertyConfig.single) !== null && _b !== void 0 ? _b : false,
|
|
2108
2097
|
ignoreFalse: propertyConfig.defaultValue === 'false',
|
|
2109
2098
|
ignoreTrue: propertyConfig.defaultValue === 'true',
|
|
@@ -2225,7 +2214,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2225
2214
|
writeTagKey(s) {
|
|
2226
2215
|
if (s != null) {
|
|
2227
2216
|
this.write(Breakscape_1.Breakscape.breakscape(`${s}`, {
|
|
2228
|
-
textFormat: TextFormat_1.TextFormat.
|
|
2217
|
+
textFormat: TextFormat_1.TextFormat.plainText,
|
|
2229
2218
|
textLocation: TextLocation_1.TextLocation.tag,
|
|
2230
2219
|
}));
|
|
2231
2220
|
}
|
|
@@ -2245,8 +2234,8 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2245
2234
|
const s = typeof text === 'string' ? text : undefined;
|
|
2246
2235
|
const ast = Array.isArray(text) ? text : undefined;
|
|
2247
2236
|
const spaces = isTagValue ? this.spacesAroundValuesStr : '';
|
|
2248
|
-
// For plain strings use TextFormat.text, otherwise keep the requested format
|
|
2249
|
-
const
|
|
2237
|
+
// For plain strings use TextFormat.text, otherwise keep the requested format for breakscaping.
|
|
2238
|
+
const breakscapeFormat = format === TextFormat_1.TextFormat.bitmarkText ? format : TextFormat_1.TextFormat.plainText;
|
|
2250
2239
|
/** Wrap a piece of text in the required padding (only for tag values). */
|
|
2251
2240
|
const wrap = (content) => (isTagValue ? `${spaces}${content}${spaces}` : content);
|
|
2252
2241
|
/**
|
|
@@ -2266,7 +2255,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2266
2255
|
/* String */
|
|
2267
2256
|
if (s != null) {
|
|
2268
2257
|
const writeString = () => this.write(Breakscape_1.Breakscape.breakscape(s, {
|
|
2269
|
-
textFormat:
|
|
2258
|
+
textFormat: breakscapeFormat,
|
|
2270
2259
|
textLocation: location,
|
|
2271
2260
|
}));
|
|
2272
2261
|
if (isTagValue) {
|
|
@@ -2455,7 +2444,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2455
2444
|
this.writeOPA();
|
|
2456
2445
|
this.writeTagKey(key);
|
|
2457
2446
|
this.writeColon();
|
|
2458
|
-
this.writeTextOrValue(src, TextFormat_1.TextFormat.
|
|
2447
|
+
this.writeTextOrValue(src, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
2459
2448
|
if (resource.type === ResourceTag_1.ResourceTag.article) {
|
|
2460
2449
|
// this.writeNL();
|
|
2461
2450
|
}
|
|
@@ -2469,7 +2458,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2469
2458
|
this.writeOPAMP();
|
|
2470
2459
|
this.writeTagKey(type);
|
|
2471
2460
|
this.writeColon();
|
|
2472
|
-
this.writeTextOrValue(value, TextFormat_1.TextFormat.
|
|
2461
|
+
this.writeTextOrValue(value, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
2473
2462
|
if (type === ResourceTag_1.ResourceTag.article) {
|
|
2474
2463
|
// this.writeNL();
|
|
2475
2464
|
}
|
|
@@ -2477,10 +2466,9 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2477
2466
|
}
|
|
2478
2467
|
}
|
|
2479
2468
|
writeProperty(name, values, options) {
|
|
2480
|
-
var _a;
|
|
2481
2469
|
let valuesArray;
|
|
2482
2470
|
if (values !== undefined) {
|
|
2483
|
-
const isBitmarkText = options.format === PropertyFormat_1.PropertyFormat.
|
|
2471
|
+
const isBitmarkText = options.format === PropertyFormat_1.PropertyFormat.bitmarkText;
|
|
2484
2472
|
if (isBitmarkText) {
|
|
2485
2473
|
// Write bitmark text
|
|
2486
2474
|
if (options.ignoreEmpty && isBitmarkText && this.isEmptyText(values))
|
|
@@ -2488,7 +2476,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2488
2476
|
this.writeOPA();
|
|
2489
2477
|
this.writeTagKey(name);
|
|
2490
2478
|
this.writeColon();
|
|
2491
|
-
this.writeTextOrValue(values,
|
|
2479
|
+
this.writeTextOrValue(values, TextFormat_1.TextFormat.bitmarkText, TextLocation_1.TextLocation.tag);
|
|
2492
2480
|
this.writeCL();
|
|
2493
2481
|
}
|
|
2494
2482
|
else {
|
|
@@ -2513,7 +2501,7 @@ class BitmarkGenerator extends AstWalkerGenerator_1.AstWalkerGenerator {
|
|
|
2513
2501
|
this.writeOPA();
|
|
2514
2502
|
this.writeTagKey(name);
|
|
2515
2503
|
this.writeColon();
|
|
2516
|
-
this.writeTextOrValue(`${val}`, TextFormat_1.TextFormat.
|
|
2504
|
+
this.writeTextOrValue(`${val}`, TextFormat_1.TextFormat.plainText, TextLocation_1.TextLocation.tag);
|
|
2517
2505
|
this.writeCL();
|
|
2518
2506
|
// propertyIndex++;
|
|
2519
2507
|
}
|