@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
|
@@ -59,8 +59,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
59
59
|
this.ast = new Ast();
|
|
60
60
|
// State
|
|
61
61
|
this.bitType = BitType._error;
|
|
62
|
-
this.textFormat = TextFormat.
|
|
63
|
-
this.tagTextFormat = TextFormat.bitmarkMinusMinus;
|
|
62
|
+
this.textFormat = TextFormat.bitmarkText;
|
|
64
63
|
this.isBodyBitmarkText = false;
|
|
65
64
|
this.isCardAllowed = false;
|
|
66
65
|
this.firstBit = true;
|
|
@@ -144,8 +143,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
144
143
|
}
|
|
145
144
|
resetState() {
|
|
146
145
|
this.bitType = BitType._error;
|
|
147
|
-
this.textFormat = TextFormat.
|
|
148
|
-
this.tagTextFormat = TextFormat.bitmarkMinusMinus;
|
|
146
|
+
this.textFormat = TextFormat.bitmarkText;
|
|
149
147
|
this.isBodyBitmarkText = false;
|
|
150
148
|
this.isCardAllowed = false;
|
|
151
149
|
this.firstBit = true;
|
|
@@ -176,17 +174,8 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
176
174
|
// Set state variables
|
|
177
175
|
this.bitType = bit.bitType;
|
|
178
176
|
this.textFormat = (_a = bit.textFormat) !== null && _a !== void 0 ? _a : bitConfig.textFormatDefault;
|
|
179
|
-
this.isBodyBitmarkText =
|
|
180
|
-
this.textFormat === TextFormat.bitmarkMinusMinus || this.textFormat === TextFormat.bitmarkPlusPlus;
|
|
177
|
+
this.isBodyBitmarkText = this.textFormat === TextFormat.bitmarkText;
|
|
181
178
|
this.isCardAllowed = this.calculateIsCardAllowed();
|
|
182
|
-
// NOTE:
|
|
183
|
-
// If the bit text format is bitmark++ then the tagTextFormat should be bitmark+, but that is not implemented yet.
|
|
184
|
-
// It works anyhow, and would require a lot of changes to implement.
|
|
185
|
-
// Since this may well change in the future, we will keep the code as is for now.
|
|
186
|
-
this.tagTextFormat =
|
|
187
|
-
this.textFormat === TextFormat.bitmarkPlusPlus
|
|
188
|
-
? TextFormat.bitmarkPlusPlus // NOTE: should be bitmarkPlus
|
|
189
|
-
: TextFormat.bitmarkMinusMinus;
|
|
190
179
|
this.hasCardSet = this.haveValidCardSet(bit);
|
|
191
180
|
this.hasFooter = this.haveValidFooter(bit);
|
|
192
181
|
// Separate the bits with 3 newlines
|
|
@@ -248,7 +237,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
248
237
|
const comment = internalComment[i];
|
|
249
238
|
this.writeNL();
|
|
250
239
|
this.writeProperty('internalComment', comment, {
|
|
251
|
-
format: PropertyFormat.
|
|
240
|
+
format: PropertyFormat.plainText,
|
|
252
241
|
single: false,
|
|
253
242
|
ignoreEmpty: true,
|
|
254
243
|
});
|
|
@@ -272,13 +261,13 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
272
261
|
}
|
|
273
262
|
if (haveTrue)
|
|
274
263
|
this.writeProperty(PropertyTag.labelTrue, value, {
|
|
275
|
-
format: PropertyFormat.
|
|
264
|
+
format: PropertyFormat.plainText,
|
|
276
265
|
single: true,
|
|
277
266
|
ignoreEmpty: true,
|
|
278
267
|
});
|
|
279
268
|
if (haveFalse)
|
|
280
269
|
this.writeProperty(PropertyTag.labelFalse, bit.labelFalse, {
|
|
281
|
-
format: PropertyFormat.
|
|
270
|
+
format: PropertyFormat.plainText,
|
|
282
271
|
single: true,
|
|
283
272
|
ignoreEmpty: true,
|
|
284
273
|
});
|
|
@@ -300,32 +289,32 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
300
289
|
const { url, mockupId, size, format, trim } = imageSource;
|
|
301
290
|
this.writeNL();
|
|
302
291
|
this.writeProperty('imageSource', url, {
|
|
303
|
-
format: PropertyFormat.
|
|
292
|
+
format: PropertyFormat.plainText,
|
|
304
293
|
single: true,
|
|
305
294
|
ignoreEmpty: true,
|
|
306
295
|
});
|
|
307
296
|
if (url) {
|
|
308
297
|
if (mockupId)
|
|
309
298
|
this.writeProperty('mockupId', mockupId, {
|
|
310
|
-
format: PropertyFormat.
|
|
299
|
+
format: PropertyFormat.plainText,
|
|
311
300
|
single: true,
|
|
312
301
|
ignoreEmpty: true,
|
|
313
302
|
});
|
|
314
303
|
if (size)
|
|
315
304
|
this.writeProperty('size', size, {
|
|
316
|
-
format: PropertyFormat.
|
|
305
|
+
format: PropertyFormat.plainText,
|
|
317
306
|
single: true,
|
|
318
307
|
ignoreEmpty: true,
|
|
319
308
|
});
|
|
320
309
|
if (format)
|
|
321
310
|
this.writeProperty('format', format, {
|
|
322
|
-
format: PropertyFormat.
|
|
311
|
+
format: PropertyFormat.plainText,
|
|
323
312
|
single: true,
|
|
324
313
|
ignoreEmpty: true,
|
|
325
314
|
});
|
|
326
315
|
if (BooleanUtils.isBoolean(trim))
|
|
327
316
|
this.writeProperty('trim', trim, {
|
|
328
|
-
format: PropertyFormat.
|
|
317
|
+
format: PropertyFormat.plainText,
|
|
329
318
|
single: true,
|
|
330
319
|
ignoreEmpty: true,
|
|
331
320
|
});
|
|
@@ -343,13 +332,13 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
343
332
|
const { technicalTerm, lang } = nodeValue;
|
|
344
333
|
this.writeNL();
|
|
345
334
|
this.writeProperty('technicalTerm', technicalTerm, {
|
|
346
|
-
format: PropertyFormat.
|
|
335
|
+
format: PropertyFormat.plainText,
|
|
347
336
|
single: true,
|
|
348
337
|
ignoreEmpty: true,
|
|
349
338
|
});
|
|
350
339
|
if (lang != null) {
|
|
351
340
|
this.writeProperty('lang', lang, {
|
|
352
|
-
format: PropertyFormat.
|
|
341
|
+
format: PropertyFormat.plainText,
|
|
353
342
|
single: true,
|
|
354
343
|
ignoreEmpty: true,
|
|
355
344
|
});
|
|
@@ -367,41 +356,41 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
367
356
|
const { servings, unit, unitAbbr, decimalPlaces, disableCalculation, hint } = nodeValue;
|
|
368
357
|
this.writeNL();
|
|
369
358
|
this.writeProperty('servings', servings, {
|
|
370
|
-
format: PropertyFormat.
|
|
359
|
+
format: PropertyFormat.plainText,
|
|
371
360
|
single: true,
|
|
372
361
|
ignoreEmpty: true,
|
|
373
362
|
});
|
|
374
363
|
if (unit != null) {
|
|
375
364
|
this.writeProperty('unit', unit, {
|
|
376
|
-
format: PropertyFormat.
|
|
365
|
+
format: PropertyFormat.plainText,
|
|
377
366
|
single: true,
|
|
378
367
|
ignoreEmpty: true,
|
|
379
368
|
});
|
|
380
369
|
}
|
|
381
370
|
if (unitAbbr != null) {
|
|
382
371
|
this.writeProperty('unitAbbr', unitAbbr, {
|
|
383
|
-
format: PropertyFormat.
|
|
372
|
+
format: PropertyFormat.plainText,
|
|
384
373
|
single: true,
|
|
385
374
|
ignoreEmpty: true,
|
|
386
375
|
});
|
|
387
376
|
}
|
|
388
377
|
if (decimalPlaces != null) {
|
|
389
378
|
this.writeProperty('decimalPlaces', decimalPlaces, {
|
|
390
|
-
format: PropertyFormat.
|
|
379
|
+
format: PropertyFormat.plainText,
|
|
391
380
|
single: true,
|
|
392
381
|
ignoreEmpty: true,
|
|
393
382
|
});
|
|
394
383
|
}
|
|
395
384
|
if (disableCalculation != null) {
|
|
396
385
|
this.writeProperty('disableCalculation', disableCalculation, {
|
|
397
|
-
format: PropertyFormat.
|
|
386
|
+
format: PropertyFormat.plainText,
|
|
398
387
|
single: true,
|
|
399
388
|
ignoreEmpty: true,
|
|
400
389
|
});
|
|
401
390
|
}
|
|
402
391
|
if (hint != null) {
|
|
403
392
|
this.writeOPQ();
|
|
404
|
-
this.writeTextOrValue(hint, TextFormat.
|
|
393
|
+
this.writeTextOrValue(hint, TextFormat.plainText, TextLocation.tag);
|
|
405
394
|
this.writeCL();
|
|
406
395
|
}
|
|
407
396
|
return false;
|
|
@@ -416,13 +405,13 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
416
405
|
const { name, title, avatarImage } = person;
|
|
417
406
|
this.writeNL();
|
|
418
407
|
this.writeProperty('person', name, {
|
|
419
|
-
format: PropertyFormat.
|
|
408
|
+
format: PropertyFormat.plainText,
|
|
420
409
|
single: true,
|
|
421
410
|
ignoreEmpty: true,
|
|
422
411
|
});
|
|
423
412
|
if (title) {
|
|
424
413
|
this.writeProperty('title', title, {
|
|
425
|
-
format: PropertyFormat.
|
|
414
|
+
format: PropertyFormat.plainText,
|
|
426
415
|
single: true,
|
|
427
416
|
ignoreEmpty: true,
|
|
428
417
|
});
|
|
@@ -506,7 +495,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
506
495
|
// Handle as a standard icon property
|
|
507
496
|
this.writeNL();
|
|
508
497
|
this.writeProperty('icon', node.value, {
|
|
509
|
-
format: PropertyFormat.
|
|
498
|
+
format: PropertyFormat.plainText,
|
|
510
499
|
single: true,
|
|
511
500
|
ignoreEmpty: true,
|
|
512
501
|
});
|
|
@@ -536,13 +525,13 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
536
525
|
const levelKey = node.key === NodeType.ratingLevelStart ? PropertyTag.ratingLevelStart : PropertyTag.ratingLevelEnd;
|
|
537
526
|
this.writeNL();
|
|
538
527
|
this.writeProperty(levelKey, level, {
|
|
539
|
-
format: PropertyFormat.
|
|
528
|
+
format: PropertyFormat.plainText,
|
|
540
529
|
single: true,
|
|
541
530
|
ignoreEmpty: true,
|
|
542
531
|
});
|
|
543
532
|
if (label) {
|
|
544
533
|
this.writeProperty('label', label, {
|
|
545
|
-
format: PropertyFormat.
|
|
534
|
+
format: PropertyFormat.bitmarkText,
|
|
546
535
|
single: true,
|
|
547
536
|
ignoreEmpty: true,
|
|
548
537
|
});
|
|
@@ -566,20 +555,20 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
566
555
|
if (mark) {
|
|
567
556
|
this.writeNL();
|
|
568
557
|
this.writeProperty('mark', mark, {
|
|
569
|
-
format: PropertyFormat.
|
|
558
|
+
format: PropertyFormat.plainText,
|
|
570
559
|
single: true,
|
|
571
560
|
ignoreEmpty: true,
|
|
572
561
|
});
|
|
573
562
|
if (color) {
|
|
574
563
|
this.writeProperty('color', color, {
|
|
575
|
-
format: PropertyFormat.
|
|
564
|
+
format: PropertyFormat.plainText,
|
|
576
565
|
single: true,
|
|
577
566
|
ignoreEmpty: true,
|
|
578
567
|
});
|
|
579
568
|
}
|
|
580
569
|
if (emphasis) {
|
|
581
570
|
this.writeProperty('emphasis', emphasis, {
|
|
582
|
-
format: PropertyFormat.
|
|
571
|
+
format: PropertyFormat.plainText,
|
|
583
572
|
single: true,
|
|
584
573
|
ignoreEmpty: true,
|
|
585
574
|
});
|
|
@@ -593,7 +582,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
593
582
|
if (node.value) {
|
|
594
583
|
this.writeNL();
|
|
595
584
|
this.writeProperty('partialAnswer', node.value, {
|
|
596
|
-
format: PropertyFormat.
|
|
585
|
+
format: PropertyFormat.plainText,
|
|
597
586
|
single: true,
|
|
598
587
|
ignoreEmpty: true,
|
|
599
588
|
});
|
|
@@ -606,7 +595,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
606
595
|
if (node.value) {
|
|
607
596
|
this.writeNL();
|
|
608
597
|
this.writeProperty('partialAnswer', node.value, {
|
|
609
|
-
format: PropertyFormat.
|
|
598
|
+
format: PropertyFormat.plainText,
|
|
610
599
|
single: true,
|
|
611
600
|
ignoreEmpty: true,
|
|
612
601
|
});
|
|
@@ -620,7 +609,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
620
609
|
if (node.value) {
|
|
621
610
|
this.writeNL();
|
|
622
611
|
this.writeProperty('sampleSolution', node.value, {
|
|
623
|
-
format: PropertyFormat.
|
|
612
|
+
format: PropertyFormat.plainText,
|
|
624
613
|
single: true,
|
|
625
614
|
ignoreEmpty: true,
|
|
626
615
|
});
|
|
@@ -632,7 +621,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
632
621
|
if (node.value) {
|
|
633
622
|
this.writeNL();
|
|
634
623
|
this.writeProperty('sampleSolution', node.value, {
|
|
635
|
-
format: PropertyFormat.
|
|
624
|
+
format: PropertyFormat.plainText,
|
|
636
625
|
single: true,
|
|
637
626
|
ignoreEmpty: true,
|
|
638
627
|
});
|
|
@@ -645,7 +634,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
645
634
|
leaf_reasonableNumOfChars(node, _route) {
|
|
646
635
|
this.writeNL();
|
|
647
636
|
this.writeProperty('reasonableNumOfChars', node.value, {
|
|
648
|
-
format: PropertyFormat.
|
|
637
|
+
format: PropertyFormat.plainText,
|
|
649
638
|
single: true,
|
|
650
639
|
ignoreEmpty: true,
|
|
651
640
|
});
|
|
@@ -658,7 +647,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
658
647
|
return;
|
|
659
648
|
this.writeNL();
|
|
660
649
|
this.writeProperty('additionalSolutions', node.value, {
|
|
661
|
-
format: PropertyFormat.
|
|
650
|
+
format: PropertyFormat.plainText,
|
|
662
651
|
single: false,
|
|
663
652
|
});
|
|
664
653
|
}
|
|
@@ -677,7 +666,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
677
666
|
return true; // Will be handled by marginNumber
|
|
678
667
|
this.writeNL_IfNotChain(route);
|
|
679
668
|
this.writeOPC();
|
|
680
|
-
this.writeTextOrValue(item,
|
|
669
|
+
this.writeTextOrValue(item, TextFormat.bitmarkText, TextLocation.tag);
|
|
681
670
|
this.writeCL();
|
|
682
671
|
return true;
|
|
683
672
|
}
|
|
@@ -694,10 +683,10 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
694
683
|
return true; // Will be handled by marginNumber
|
|
695
684
|
this.writeNL_IfNotChain(route);
|
|
696
685
|
this.writeOPC();
|
|
697
|
-
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 : '',
|
|
686
|
+
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.bitmarkText, TextLocation.tag);
|
|
698
687
|
this.writeCL();
|
|
699
688
|
this.writeOPC();
|
|
700
|
-
this.writeTextOrValue(lead,
|
|
689
|
+
this.writeTextOrValue(lead, TextFormat.bitmarkText, TextLocation.tag);
|
|
701
690
|
this.writeCL();
|
|
702
691
|
return true;
|
|
703
692
|
}
|
|
@@ -712,13 +701,13 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
712
701
|
return true; // Will be handled by marginNumber
|
|
713
702
|
this.writeNL_IfNotChain(route);
|
|
714
703
|
this.writeOPC();
|
|
715
|
-
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 : '',
|
|
704
|
+
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.bitmarkText, TextLocation.tag);
|
|
716
705
|
this.writeCL();
|
|
717
706
|
this.writeOPC();
|
|
718
|
-
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 : '',
|
|
707
|
+
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.bitmarkText, TextLocation.tag);
|
|
719
708
|
this.writeCL();
|
|
720
709
|
this.writeOPC();
|
|
721
|
-
this.writeTextOrValue(pageNumber !== null && pageNumber !== void 0 ? pageNumber : '',
|
|
710
|
+
this.writeTextOrValue(pageNumber !== null && pageNumber !== void 0 ? pageNumber : '', TextFormat.bitmarkText, TextLocation.tag);
|
|
722
711
|
this.writeCL();
|
|
723
712
|
return true;
|
|
724
713
|
}
|
|
@@ -731,16 +720,16 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
731
720
|
return false; // Ignore empty
|
|
732
721
|
this.writeNL_IfNotChain(route);
|
|
733
722
|
this.writeOPC();
|
|
734
|
-
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 : '',
|
|
723
|
+
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.bitmarkText, TextLocation.tag);
|
|
735
724
|
this.writeCL();
|
|
736
725
|
this.writeOPC();
|
|
737
|
-
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 : '',
|
|
726
|
+
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.bitmarkText, TextLocation.tag);
|
|
738
727
|
this.writeCL();
|
|
739
728
|
this.writeOPC();
|
|
740
|
-
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 : '',
|
|
729
|
+
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.bitmarkText, TextLocation.tag);
|
|
741
730
|
this.writeCL();
|
|
742
731
|
this.writeOPC();
|
|
743
|
-
this.writeTextOrValue(marginNumber,
|
|
732
|
+
this.writeTextOrValue(marginNumber, TextFormat.bitmarkText, TextLocation.tag);
|
|
744
733
|
this.writeCL();
|
|
745
734
|
return true;
|
|
746
735
|
}
|
|
@@ -762,7 +751,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
762
751
|
if (text) {
|
|
763
752
|
this.writePlainTextDivider();
|
|
764
753
|
this.writeNL();
|
|
765
|
-
this.writeTextOrValue(text, TextFormat.
|
|
754
|
+
this.writeTextOrValue(text, TextFormat.plainText, TextLocation.body);
|
|
766
755
|
}
|
|
767
756
|
}
|
|
768
757
|
}
|
|
@@ -781,7 +770,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
781
770
|
this.writePlainTextDivider();
|
|
782
771
|
this.writeNL();
|
|
783
772
|
const s = (StringUtils.isString(body.body) ? body.body : '');
|
|
784
|
-
this.writeTextOrValue(`${s}`, TextFormat.
|
|
773
|
+
this.writeTextOrValue(`${s}`, TextFormat.plainText, TextLocation.body);
|
|
785
774
|
}
|
|
786
775
|
// Stop traversal of this branch
|
|
787
776
|
return false;
|
|
@@ -808,7 +797,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
808
797
|
else {
|
|
809
798
|
for (const solution of gap.solutions) {
|
|
810
799
|
this.writeOPU();
|
|
811
|
-
this.writeTextOrValue(solution, TextFormat.
|
|
800
|
+
this.writeTextOrValue(solution, TextFormat.plainText, TextLocation.tag);
|
|
812
801
|
this.writeCL();
|
|
813
802
|
}
|
|
814
803
|
}
|
|
@@ -819,7 +808,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
819
808
|
enter_mark(node, _route) {
|
|
820
809
|
const mark = node.value;
|
|
821
810
|
this.writeOPE();
|
|
822
|
-
this.writeTextOrValue(mark.solution, TextFormat.
|
|
811
|
+
this.writeTextOrValue(mark.solution, TextFormat.plainText, TextLocation.tag);
|
|
823
812
|
this.writeCL();
|
|
824
813
|
// Continue traversal
|
|
825
814
|
return true;
|
|
@@ -849,7 +838,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
849
838
|
if (this.isBodyBitmarkText) {
|
|
850
839
|
// handle bitmark text
|
|
851
840
|
this.writeNL();
|
|
852
|
-
this.writeTextOrValue('==== footer ====', TextFormat.
|
|
841
|
+
this.writeTextOrValue('==== footer ====', TextFormat.plainText, TextLocation.body);
|
|
853
842
|
this.writeNL();
|
|
854
843
|
// The text generator will write to the writer
|
|
855
844
|
this.writeTextOrValue(footer.footer, this.textFormat, TextLocation.body, {
|
|
@@ -891,7 +880,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
891
880
|
return;
|
|
892
881
|
if (solution) {
|
|
893
882
|
this.writeOPE();
|
|
894
|
-
this.writeTextOrValue(solution, TextFormat.
|
|
883
|
+
this.writeTextOrValue(solution, TextFormat.plainText, TextLocation.tag);
|
|
895
884
|
this.writeCL();
|
|
896
885
|
}
|
|
897
886
|
}
|
|
@@ -903,7 +892,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
903
892
|
const mark = node.value;
|
|
904
893
|
if (mark) {
|
|
905
894
|
this.writeProperty('mark', mark, {
|
|
906
|
-
format: PropertyFormat.
|
|
895
|
+
format: PropertyFormat.plainText,
|
|
907
896
|
single: true,
|
|
908
897
|
ignoreEmpty: true,
|
|
909
898
|
});
|
|
@@ -918,7 +907,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
918
907
|
else {
|
|
919
908
|
this.writeOPM();
|
|
920
909
|
}
|
|
921
|
-
this.writeTextOrValue(selectOption.text, TextFormat.
|
|
910
|
+
this.writeTextOrValue(selectOption.text, TextFormat.plainText, TextLocation.tag);
|
|
922
911
|
this.writeCL();
|
|
923
912
|
// Continue traversal
|
|
924
913
|
return true;
|
|
@@ -932,7 +921,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
932
921
|
else {
|
|
933
922
|
this.writeOPM();
|
|
934
923
|
}
|
|
935
|
-
this.writeTextOrValue(highlightText.text, TextFormat.
|
|
924
|
+
this.writeTextOrValue(highlightText.text, TextFormat.plainText, TextLocation.tag);
|
|
936
925
|
this.writeCL();
|
|
937
926
|
// Continue traversal
|
|
938
927
|
return true;
|
|
@@ -1013,7 +1002,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1013
1002
|
else {
|
|
1014
1003
|
this.writeOPM();
|
|
1015
1004
|
}
|
|
1016
|
-
this.writeTextOrValue(statement.statement, TextFormat.
|
|
1005
|
+
this.writeTextOrValue(statement.statement, TextFormat.plainText, TextLocation.tag);
|
|
1017
1006
|
this.writeCL();
|
|
1018
1007
|
// Continue traversal
|
|
1019
1008
|
return true;
|
|
@@ -1030,7 +1019,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1030
1019
|
else {
|
|
1031
1020
|
this.writeOPM();
|
|
1032
1021
|
}
|
|
1033
|
-
this.writeTextOrValue(choice.choice, TextFormat.
|
|
1022
|
+
this.writeTextOrValue(choice.choice, TextFormat.plainText, TextLocation.tag);
|
|
1034
1023
|
this.writeCL();
|
|
1035
1024
|
// Continue traversal
|
|
1036
1025
|
return true;
|
|
@@ -1046,7 +1035,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1046
1035
|
else {
|
|
1047
1036
|
this.writeOPM();
|
|
1048
1037
|
}
|
|
1049
|
-
this.writeTextOrValue(response.response, TextFormat.
|
|
1038
|
+
this.writeTextOrValue(response.response, TextFormat.plainText, TextLocation.tag);
|
|
1050
1039
|
this.writeCL();
|
|
1051
1040
|
// Continue traversal
|
|
1052
1041
|
return true;
|
|
@@ -1179,13 +1168,13 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1179
1168
|
leaf_columnsValue(node, _route) {
|
|
1180
1169
|
this.writeNL();
|
|
1181
1170
|
this.writeOPHASH();
|
|
1182
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1171
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1183
1172
|
this.writeCL();
|
|
1184
1173
|
}
|
|
1185
1174
|
enter_columnsValue(node, _route) {
|
|
1186
1175
|
this.writeNL();
|
|
1187
1176
|
this.writeOPHASH();
|
|
1188
|
-
this.writeTextOrValue(node.value,
|
|
1177
|
+
this.writeTextOrValue(node.value, TextFormat.bitmarkText, TextLocation.tag);
|
|
1189
1178
|
this.writeCL();
|
|
1190
1179
|
}
|
|
1191
1180
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data -> dataValue
|
|
@@ -1221,7 +1210,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1221
1210
|
this.writeNL();
|
|
1222
1211
|
this.writeOP();
|
|
1223
1212
|
this.writeHash();
|
|
1224
|
-
this.writeTextOrValue(cell.title,
|
|
1213
|
+
this.writeTextOrValue(cell.title, TextFormat.bitmarkText, TextLocation.tag);
|
|
1225
1214
|
this.writeCL();
|
|
1226
1215
|
}
|
|
1227
1216
|
if (cell.audio) {
|
|
@@ -1317,7 +1306,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1317
1306
|
if (ingredient.title != null) {
|
|
1318
1307
|
this.writeNL();
|
|
1319
1308
|
this.writeOPHASH();
|
|
1320
|
-
this.writeTextOrValue(ingredient.title, TextFormat.
|
|
1309
|
+
this.writeTextOrValue(ingredient.title, TextFormat.plainText, TextLocation.tag);
|
|
1321
1310
|
this.writeCL();
|
|
1322
1311
|
// this.writeNL();
|
|
1323
1312
|
}
|
|
@@ -1333,34 +1322,34 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1333
1322
|
// [!43]
|
|
1334
1323
|
if (ingredient.quantity != null) {
|
|
1335
1324
|
this.writeOPB();
|
|
1336
|
-
this.writeTextOrValue(`${ingredient.quantity}`, TextFormat.
|
|
1325
|
+
this.writeTextOrValue(`${ingredient.quantity}`, TextFormat.plainText, TextLocation.tag);
|
|
1337
1326
|
this.writeCL();
|
|
1338
1327
|
}
|
|
1339
1328
|
// [@unit:kilograms]
|
|
1340
1329
|
if (ingredient.unit != null)
|
|
1341
1330
|
this.writeProperty('unit', ingredient.unit, {
|
|
1342
|
-
format: PropertyFormat.
|
|
1331
|
+
format: PropertyFormat.plainText,
|
|
1343
1332
|
single: true,
|
|
1344
1333
|
ignoreEmpty: true,
|
|
1345
1334
|
});
|
|
1346
1335
|
// [@unitAbbr:kg]
|
|
1347
1336
|
if (ingredient.unitAbbr != null)
|
|
1348
1337
|
this.writeProperty('unitAbbr', ingredient.unitAbbr, {
|
|
1349
|
-
format: PropertyFormat.
|
|
1338
|
+
format: PropertyFormat.plainText,
|
|
1350
1339
|
single: true,
|
|
1351
1340
|
ignoreEmpty: true,
|
|
1352
1341
|
});
|
|
1353
1342
|
// [@decimalPlaces:1]
|
|
1354
1343
|
if (ingredient.decimalPlaces != null)
|
|
1355
1344
|
this.writeProperty('decimalPlaces', ingredient.decimalPlaces, {
|
|
1356
|
-
format: PropertyFormat.
|
|
1345
|
+
format: PropertyFormat.plainText,
|
|
1357
1346
|
single: true,
|
|
1358
1347
|
ignoreEmpty: true,
|
|
1359
1348
|
});
|
|
1360
1349
|
// [@disableCalculation]
|
|
1361
1350
|
if (ingredient.disableCalculation)
|
|
1362
1351
|
this.writeProperty('disableCalculation', true, {
|
|
1363
|
-
format: PropertyFormat.
|
|
1352
|
+
format: PropertyFormat.plainText,
|
|
1364
1353
|
single: true,
|
|
1365
1354
|
ignoreEmpty: true,
|
|
1366
1355
|
});
|
|
@@ -1393,7 +1382,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1393
1382
|
return;
|
|
1394
1383
|
this.writeNL();
|
|
1395
1384
|
this.writeOPB();
|
|
1396
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1385
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1397
1386
|
this.writeCL();
|
|
1398
1387
|
}
|
|
1399
1388
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses -> botResponsesValue -> reaction
|
|
@@ -1403,7 +1392,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1403
1392
|
return;
|
|
1404
1393
|
this.writeNL();
|
|
1405
1394
|
this.writeProperty('reaction', node.value, {
|
|
1406
|
-
format: PropertyFormat.
|
|
1395
|
+
format: PropertyFormat.plainText,
|
|
1407
1396
|
single: true,
|
|
1408
1397
|
ignoreEmpty: true,
|
|
1409
1398
|
});
|
|
@@ -1440,7 +1429,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1440
1429
|
const posterImage = node.value;
|
|
1441
1430
|
if (posterImage) {
|
|
1442
1431
|
this.writeProperty('posterImage', posterImage, {
|
|
1443
|
-
format: PropertyFormat.
|
|
1432
|
+
format: PropertyFormat.plainText,
|
|
1444
1433
|
single: true,
|
|
1445
1434
|
ignoreEmpty: true,
|
|
1446
1435
|
});
|
|
@@ -1451,7 +1440,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1451
1440
|
const posterImage = node.value;
|
|
1452
1441
|
if (posterImage && posterImage.src) {
|
|
1453
1442
|
this.writeProperty('posterImage', posterImage.src, {
|
|
1454
|
-
format: PropertyFormat.
|
|
1443
|
+
format: PropertyFormat.plainText,
|
|
1455
1444
|
single: true,
|
|
1456
1445
|
ignoreEmpty: true,
|
|
1457
1446
|
});
|
|
@@ -1473,7 +1462,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1473
1462
|
const thumbnail = thumbnails[i];
|
|
1474
1463
|
const key = thumbnailKeys[i];
|
|
1475
1464
|
this.writeProperty(key, thumbnail.src, {
|
|
1476
|
-
format: PropertyFormat.
|
|
1465
|
+
format: PropertyFormat.plainText,
|
|
1477
1466
|
single: true,
|
|
1478
1467
|
ignoreEmpty: true,
|
|
1479
1468
|
});
|
|
@@ -1522,7 +1511,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1522
1511
|
this.writeOP();
|
|
1523
1512
|
for (let i = 0; i < +level; i++)
|
|
1524
1513
|
this.writeHash();
|
|
1525
|
-
this.writeTextOrValue(title,
|
|
1514
|
+
this.writeTextOrValue(title, TextFormat.bitmarkText, TextLocation.tag);
|
|
1526
1515
|
this.writeCL();
|
|
1527
1516
|
}
|
|
1528
1517
|
// Stop traversal of this branch
|
|
@@ -1542,7 +1531,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1542
1531
|
this.writeOP();
|
|
1543
1532
|
for (let i = 0; i < level; i++)
|
|
1544
1533
|
this.writeHash();
|
|
1545
|
-
this.writeTextOrValue(subtitle,
|
|
1534
|
+
this.writeTextOrValue(subtitle, TextFormat.bitmarkText, TextLocation.tag);
|
|
1546
1535
|
this.writeCL();
|
|
1547
1536
|
}
|
|
1548
1537
|
// Stop traversal of this branch
|
|
@@ -1560,17 +1549,17 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1560
1549
|
if (book) {
|
|
1561
1550
|
this.writeNL();
|
|
1562
1551
|
this.writeProperty('book', book.book, {
|
|
1563
|
-
format: PropertyFormat.
|
|
1552
|
+
format: PropertyFormat.plainText,
|
|
1564
1553
|
single: true,
|
|
1565
1554
|
ignoreEmpty: false,
|
|
1566
1555
|
});
|
|
1567
1556
|
if (book.reference) {
|
|
1568
1557
|
this.writeOPRANGLE();
|
|
1569
|
-
this.writeTextOrValue(book.reference, TextFormat.
|
|
1558
|
+
this.writeTextOrValue(book.reference, TextFormat.plainText, TextLocation.tag);
|
|
1570
1559
|
this.writeCL();
|
|
1571
1560
|
if (book.referenceEnd) {
|
|
1572
1561
|
this.writeOPRANGLE();
|
|
1573
|
-
this.writeTextOrValue(book.referenceEnd, TextFormat.
|
|
1562
|
+
this.writeTextOrValue(book.referenceEnd, TextFormat.plainText, TextLocation.tag);
|
|
1574
1563
|
this.writeCL();
|
|
1575
1564
|
}
|
|
1576
1565
|
}
|
|
@@ -1585,17 +1574,17 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1585
1574
|
if (bit && node.value) {
|
|
1586
1575
|
this.writeNL();
|
|
1587
1576
|
this.writeProperty('book', node.value, {
|
|
1588
|
-
format: PropertyFormat.
|
|
1577
|
+
format: PropertyFormat.plainText,
|
|
1589
1578
|
single: true,
|
|
1590
1579
|
ignoreEmpty: false,
|
|
1591
1580
|
});
|
|
1592
1581
|
if (bit.reference) {
|
|
1593
1582
|
this.writeOPRANGLE();
|
|
1594
|
-
this.writeTextOrValue(bit.reference, TextFormat.
|
|
1583
|
+
this.writeTextOrValue(bit.reference, TextFormat.plainText, TextLocation.tag);
|
|
1595
1584
|
this.writeCL();
|
|
1596
1585
|
if (bit.referenceEnd) {
|
|
1597
1586
|
this.writeOPRANGLE();
|
|
1598
|
-
this.writeTextOrValue(bit.referenceEnd, TextFormat.
|
|
1587
|
+
this.writeTextOrValue(bit.referenceEnd, TextFormat.plainText, TextLocation.tag);
|
|
1599
1588
|
this.writeCL();
|
|
1600
1589
|
}
|
|
1601
1590
|
}
|
|
@@ -1606,7 +1595,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1606
1595
|
if (node.value) {
|
|
1607
1596
|
this.writeNL();
|
|
1608
1597
|
this.writeOPDANGLE();
|
|
1609
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1598
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1610
1599
|
this.writeCL();
|
|
1611
1600
|
}
|
|
1612
1601
|
}
|
|
@@ -1619,7 +1608,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1619
1608
|
if (!bit.book) {
|
|
1620
1609
|
this.writeNL();
|
|
1621
1610
|
this.writeOPRANGLE();
|
|
1622
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1611
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1623
1612
|
this.writeCL();
|
|
1624
1613
|
}
|
|
1625
1614
|
}
|
|
@@ -1633,7 +1622,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1633
1622
|
if (!this.isEmptyText(text)) {
|
|
1634
1623
|
this.writeNL_IfNotChain(route);
|
|
1635
1624
|
this.writeOPQ();
|
|
1636
|
-
this.writeTextOrValue(text,
|
|
1625
|
+
this.writeTextOrValue(text, TextFormat.bitmarkText, TextLocation.tag);
|
|
1637
1626
|
this.writeCL();
|
|
1638
1627
|
}
|
|
1639
1628
|
// Stop traversal of this branch
|
|
@@ -1646,7 +1635,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1646
1635
|
if (!this.isEmptyText(text)) {
|
|
1647
1636
|
this.writeNL_IfNotChain(route);
|
|
1648
1637
|
this.writeOPB();
|
|
1649
|
-
this.writeTextOrValue(text,
|
|
1638
|
+
this.writeTextOrValue(text, TextFormat.bitmarkText, TextLocation.tag);
|
|
1650
1639
|
this.writeCL();
|
|
1651
1640
|
}
|
|
1652
1641
|
// Stop traversal of this branch
|
|
@@ -1669,7 +1658,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1669
1658
|
return;
|
|
1670
1659
|
this.writeNL();
|
|
1671
1660
|
this.writeProperty('refAuthor', node.value, {
|
|
1672
|
-
format: PropertyFormat.
|
|
1661
|
+
format: PropertyFormat.plainText,
|
|
1673
1662
|
single: false,
|
|
1674
1663
|
ignoreEmpty: true,
|
|
1675
1664
|
});
|
|
@@ -1680,7 +1669,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1680
1669
|
return;
|
|
1681
1670
|
this.writeNL();
|
|
1682
1671
|
this.writeProperty('refBookTitle', node.value, {
|
|
1683
|
-
format: PropertyFormat.
|
|
1672
|
+
format: PropertyFormat.plainText,
|
|
1684
1673
|
single: true,
|
|
1685
1674
|
ignoreEmpty: true,
|
|
1686
1675
|
});
|
|
@@ -1691,7 +1680,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1691
1680
|
return;
|
|
1692
1681
|
this.writeNL();
|
|
1693
1682
|
this.writeProperty('refPublisher', node.value, {
|
|
1694
|
-
format: PropertyFormat.
|
|
1683
|
+
format: PropertyFormat.plainText,
|
|
1695
1684
|
single: false,
|
|
1696
1685
|
ignoreEmpty: true,
|
|
1697
1686
|
});
|
|
@@ -1702,7 +1691,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1702
1691
|
return;
|
|
1703
1692
|
this.writeNL();
|
|
1704
1693
|
this.writeProperty('refPublicationYear', node.value, {
|
|
1705
|
-
format: PropertyFormat.
|
|
1694
|
+
format: PropertyFormat.plainText,
|
|
1706
1695
|
single: true,
|
|
1707
1696
|
ignoreEmpty: true,
|
|
1708
1697
|
});
|
|
@@ -1713,7 +1702,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1713
1702
|
return;
|
|
1714
1703
|
this.writeNL();
|
|
1715
1704
|
this.writeProperty('citationStyle', node.value, {
|
|
1716
|
-
format: PropertyFormat.
|
|
1705
|
+
format: PropertyFormat.plainText,
|
|
1717
1706
|
single: true,
|
|
1718
1707
|
ignoreEmpty: true,
|
|
1719
1708
|
});
|
|
@@ -1741,11 +1730,11 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1741
1730
|
}
|
|
1742
1731
|
else if (Array.isArray(example)) {
|
|
1743
1732
|
// TextAst
|
|
1744
|
-
this.writeTextOrValue(example,
|
|
1733
|
+
this.writeTextOrValue(example, TextFormat.bitmarkText, TextLocation.tag);
|
|
1745
1734
|
}
|
|
1746
1735
|
else {
|
|
1747
1736
|
// String
|
|
1748
|
-
this.writeTextOrValue(example, TextFormat.
|
|
1737
|
+
this.writeTextOrValue(example, TextFormat.plainText, TextLocation.tag);
|
|
1749
1738
|
}
|
|
1750
1739
|
this.writeCL();
|
|
1751
1740
|
}
|
|
@@ -1771,7 +1760,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1771
1760
|
return;
|
|
1772
1761
|
if (node.value != null) {
|
|
1773
1762
|
this.writeOPU();
|
|
1774
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1763
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1775
1764
|
this.writeCL();
|
|
1776
1765
|
}
|
|
1777
1766
|
}
|
|
@@ -1780,7 +1769,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1780
1769
|
leaf_prefix(node, _route) {
|
|
1781
1770
|
if (node.value) {
|
|
1782
1771
|
this.writeOPPRE();
|
|
1783
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1772
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1784
1773
|
this.writeCL();
|
|
1785
1774
|
}
|
|
1786
1775
|
}
|
|
@@ -1789,7 +1778,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1789
1778
|
leaf_postfix(node, _route) {
|
|
1790
1779
|
if (node.value) {
|
|
1791
1780
|
this.writeOPPOST();
|
|
1792
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1781
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1793
1782
|
this.writeCL();
|
|
1794
1783
|
}
|
|
1795
1784
|
}
|
|
@@ -1807,21 +1796,21 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1807
1796
|
leaf_forKeys(node, _route) {
|
|
1808
1797
|
this.writeNL();
|
|
1809
1798
|
this.writeOPHASH();
|
|
1810
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1799
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1811
1800
|
this.writeCL();
|
|
1812
1801
|
}
|
|
1813
1802
|
// bitmarkAst -> bits -> bitsValue -> heading -> forValues
|
|
1814
1803
|
leaf_forValues(node, _route) {
|
|
1815
1804
|
this.writeNL();
|
|
1816
1805
|
this.writeOPHASH();
|
|
1817
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1806
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1818
1807
|
this.writeCL();
|
|
1819
1808
|
}
|
|
1820
1809
|
// bitmarkAst -> bits -> bitsValue -> heading -> forValuesValue
|
|
1821
1810
|
leaf_forValuesValue(node, _route) {
|
|
1822
1811
|
this.writeNL();
|
|
1823
1812
|
this.writeOPHASH();
|
|
1824
|
-
this.writeTextOrValue(node.value, TextFormat.
|
|
1813
|
+
this.writeTextOrValue(node.value, TextFormat.plainText, TextLocation.tag);
|
|
1825
1814
|
this.writeCL();
|
|
1826
1815
|
}
|
|
1827
1816
|
// bitmarkAst -> bits -> bitsValue -> pairs -> pairsValue -> key
|
|
@@ -1859,49 +1848,49 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1859
1848
|
// [src1x,src2x,src3x,src4x,width,height,alt,zoomDisabled,caption]
|
|
1860
1849
|
leaf_src1x(node, _route) {
|
|
1861
1850
|
this.writeProperty('src1x', node.value, {
|
|
1862
|
-
format: PropertyFormat.
|
|
1851
|
+
format: PropertyFormat.plainText,
|
|
1863
1852
|
single: true,
|
|
1864
1853
|
ignoreEmpty: true,
|
|
1865
1854
|
});
|
|
1866
1855
|
}
|
|
1867
1856
|
leaf_src2x(node, _route) {
|
|
1868
1857
|
this.writeProperty('src2x', node.value, {
|
|
1869
|
-
format: PropertyFormat.
|
|
1858
|
+
format: PropertyFormat.plainText,
|
|
1870
1859
|
single: true,
|
|
1871
1860
|
ignoreEmpty: true,
|
|
1872
1861
|
});
|
|
1873
1862
|
}
|
|
1874
1863
|
leaf_src3x(node, _route) {
|
|
1875
1864
|
this.writeProperty('src3x', node.value, {
|
|
1876
|
-
format: PropertyFormat.
|
|
1865
|
+
format: PropertyFormat.plainText,
|
|
1877
1866
|
single: true,
|
|
1878
1867
|
ignoreEmpty: true,
|
|
1879
1868
|
});
|
|
1880
1869
|
}
|
|
1881
1870
|
leaf_src4x(node, _route) {
|
|
1882
1871
|
this.writeProperty('src4x', node.value, {
|
|
1883
|
-
format: PropertyFormat.
|
|
1872
|
+
format: PropertyFormat.plainText,
|
|
1884
1873
|
single: true,
|
|
1885
1874
|
ignoreEmpty: true,
|
|
1886
1875
|
});
|
|
1887
1876
|
}
|
|
1888
1877
|
leaf_width(node, _route) {
|
|
1889
1878
|
this.writeProperty('width', node.value, {
|
|
1890
|
-
format: PropertyFormat.
|
|
1879
|
+
format: PropertyFormat.plainText,
|
|
1891
1880
|
single: true,
|
|
1892
1881
|
ignoreEmpty: true,
|
|
1893
1882
|
});
|
|
1894
1883
|
}
|
|
1895
1884
|
leaf_height(node, _route) {
|
|
1896
1885
|
this.writeProperty('height', node.value, {
|
|
1897
|
-
format: PropertyFormat.
|
|
1886
|
+
format: PropertyFormat.plainText,
|
|
1898
1887
|
single: true,
|
|
1899
1888
|
ignoreEmpty: true,
|
|
1900
1889
|
});
|
|
1901
1890
|
}
|
|
1902
1891
|
leaf_alt(node, _route) {
|
|
1903
1892
|
this.writeProperty('alt', node.value, {
|
|
1904
|
-
format: PropertyFormat.
|
|
1893
|
+
format: PropertyFormat.plainText,
|
|
1905
1894
|
single: true,
|
|
1906
1895
|
ignoreEmpty: true,
|
|
1907
1896
|
});
|
|
@@ -1931,14 +1920,14 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1931
1920
|
}
|
|
1932
1921
|
leaf_license(node, _route) {
|
|
1933
1922
|
this.writeProperty('license', node.value, {
|
|
1934
|
-
format: PropertyFormat.
|
|
1923
|
+
format: PropertyFormat.plainText,
|
|
1935
1924
|
single: true,
|
|
1936
1925
|
ignoreEmpty: true,
|
|
1937
1926
|
});
|
|
1938
1927
|
}
|
|
1939
1928
|
leaf_copyright(node, _route) {
|
|
1940
1929
|
this.writeProperty('copyright', node.value, {
|
|
1941
|
-
format: PropertyFormat.
|
|
1930
|
+
format: PropertyFormat.plainText,
|
|
1942
1931
|
single: true,
|
|
1943
1932
|
ignoreEmpty: true,
|
|
1944
1933
|
});
|
|
@@ -1962,7 +1951,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1962
1951
|
const value = node.value;
|
|
1963
1952
|
this.writeNL_IfNotChain(route);
|
|
1964
1953
|
this.writeProperty('caption', value, {
|
|
1965
|
-
format: PropertyFormat.
|
|
1954
|
+
format: PropertyFormat.bitmarkText,
|
|
1966
1955
|
single: true, // ??
|
|
1967
1956
|
ignoreEmpty: true,
|
|
1968
1957
|
});
|
|
@@ -1975,7 +1964,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1975
1964
|
return;
|
|
1976
1965
|
this.writeNL_IfNotChain(route);
|
|
1977
1966
|
this.writeProperty('search', value, {
|
|
1978
|
-
format: PropertyFormat.
|
|
1967
|
+
format: PropertyFormat.plainText,
|
|
1979
1968
|
single: true,
|
|
1980
1969
|
ignoreEmpty: true,
|
|
1981
1970
|
});
|
|
@@ -1990,7 +1979,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
1990
1979
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) === NodeType.bitsValue)
|
|
1991
1980
|
return;
|
|
1992
1981
|
this.writeProperty('duration', node.value, {
|
|
1993
|
-
format: PropertyFormat.
|
|
1982
|
+
format: PropertyFormat.plainText,
|
|
1994
1983
|
single: true,
|
|
1995
1984
|
ignoreEmpty: true,
|
|
1996
1985
|
});
|
|
@@ -2100,7 +2089,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2100
2089
|
// Write the property
|
|
2101
2090
|
this.writeNL_IfNotChain(route); // Only if NOT in chain
|
|
2102
2091
|
this.writeProperty(propertyConfig.tag, node.value, {
|
|
2103
|
-
format: (_a = propertyConfig.format) !== null && _a !== void 0 ? _a : PropertyFormat.
|
|
2092
|
+
format: (_a = propertyConfig.format) !== null && _a !== void 0 ? _a : PropertyFormat.plainText,
|
|
2104
2093
|
single: (_b = propertyConfig.single) !== null && _b !== void 0 ? _b : false,
|
|
2105
2094
|
ignoreFalse: propertyConfig.defaultValue === 'false',
|
|
2106
2095
|
ignoreTrue: propertyConfig.defaultValue === 'true',
|
|
@@ -2222,7 +2211,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2222
2211
|
writeTagKey(s) {
|
|
2223
2212
|
if (s != null) {
|
|
2224
2213
|
this.write(Breakscape.breakscape(`${s}`, {
|
|
2225
|
-
textFormat: TextFormat.
|
|
2214
|
+
textFormat: TextFormat.plainText,
|
|
2226
2215
|
textLocation: TextLocation.tag,
|
|
2227
2216
|
}));
|
|
2228
2217
|
}
|
|
@@ -2242,8 +2231,8 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2242
2231
|
const s = typeof text === 'string' ? text : undefined;
|
|
2243
2232
|
const ast = Array.isArray(text) ? text : undefined;
|
|
2244
2233
|
const spaces = isTagValue ? this.spacesAroundValuesStr : '';
|
|
2245
|
-
// For plain strings use TextFormat.text, otherwise keep the requested format
|
|
2246
|
-
const
|
|
2234
|
+
// For plain strings use TextFormat.text, otherwise keep the requested format for breakscaping.
|
|
2235
|
+
const breakscapeFormat = format === TextFormat.bitmarkText ? format : TextFormat.plainText;
|
|
2247
2236
|
/** Wrap a piece of text in the required padding (only for tag values). */
|
|
2248
2237
|
const wrap = (content) => (isTagValue ? `${spaces}${content}${spaces}` : content);
|
|
2249
2238
|
/**
|
|
@@ -2263,7 +2252,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2263
2252
|
/* String */
|
|
2264
2253
|
if (s != null) {
|
|
2265
2254
|
const writeString = () => this.write(Breakscape.breakscape(s, {
|
|
2266
|
-
textFormat:
|
|
2255
|
+
textFormat: breakscapeFormat,
|
|
2267
2256
|
textLocation: location,
|
|
2268
2257
|
}));
|
|
2269
2258
|
if (isTagValue) {
|
|
@@ -2452,7 +2441,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2452
2441
|
this.writeOPA();
|
|
2453
2442
|
this.writeTagKey(key);
|
|
2454
2443
|
this.writeColon();
|
|
2455
|
-
this.writeTextOrValue(src, TextFormat.
|
|
2444
|
+
this.writeTextOrValue(src, TextFormat.plainText, TextLocation.tag);
|
|
2456
2445
|
if (resource.type === ResourceTag.article) {
|
|
2457
2446
|
// this.writeNL();
|
|
2458
2447
|
}
|
|
@@ -2466,7 +2455,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2466
2455
|
this.writeOPAMP();
|
|
2467
2456
|
this.writeTagKey(type);
|
|
2468
2457
|
this.writeColon();
|
|
2469
|
-
this.writeTextOrValue(value, TextFormat.
|
|
2458
|
+
this.writeTextOrValue(value, TextFormat.plainText, TextLocation.tag);
|
|
2470
2459
|
if (type === ResourceTag.article) {
|
|
2471
2460
|
// this.writeNL();
|
|
2472
2461
|
}
|
|
@@ -2474,10 +2463,9 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2474
2463
|
}
|
|
2475
2464
|
}
|
|
2476
2465
|
writeProperty(name, values, options) {
|
|
2477
|
-
var _a;
|
|
2478
2466
|
let valuesArray;
|
|
2479
2467
|
if (values !== undefined) {
|
|
2480
|
-
const isBitmarkText = options.format === PropertyFormat.
|
|
2468
|
+
const isBitmarkText = options.format === PropertyFormat.bitmarkText;
|
|
2481
2469
|
if (isBitmarkText) {
|
|
2482
2470
|
// Write bitmark text
|
|
2483
2471
|
if (options.ignoreEmpty && isBitmarkText && this.isEmptyText(values))
|
|
@@ -2485,7 +2473,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2485
2473
|
this.writeOPA();
|
|
2486
2474
|
this.writeTagKey(name);
|
|
2487
2475
|
this.writeColon();
|
|
2488
|
-
this.writeTextOrValue(values,
|
|
2476
|
+
this.writeTextOrValue(values, TextFormat.bitmarkText, TextLocation.tag);
|
|
2489
2477
|
this.writeCL();
|
|
2490
2478
|
}
|
|
2491
2479
|
else {
|
|
@@ -2510,7 +2498,7 @@ class BitmarkGenerator extends AstWalkerGenerator {
|
|
|
2510
2498
|
this.writeOPA();
|
|
2511
2499
|
this.writeTagKey(name);
|
|
2512
2500
|
this.writeColon();
|
|
2513
|
-
this.writeTextOrValue(`${val}`, TextFormat.
|
|
2501
|
+
this.writeTextOrValue(`${val}`, TextFormat.plainText, TextLocation.tag);
|
|
2514
2502
|
this.writeCL();
|
|
2515
2503
|
// propertyIndex++;
|
|
2516
2504
|
}
|