@gmb/bitmark-parser-generator 1.5.7 → 1.5.9
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/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/ast/Builder.js +41 -39
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/config/raw/bits.js +11 -0
- package/dist/cjs/config/raw/bits.js.map +1 -1
- package/dist/cjs/config/raw/groups.js +11 -10
- package/dist/cjs/config/raw/groups.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +13 -3
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/cjs/generator/json/JsonGenerator.js +119 -47
- package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
- package/dist/cjs/model/ast/NodeType.js +8 -4
- package/dist/cjs/model/ast/NodeType.js.map +1 -1
- package/dist/cjs/model/enum/BitType.js +1 -0
- package/dist/cjs/model/enum/BitType.js.map +1 -1
- package/dist/cjs/model/enum/TextFormat.js +2 -1
- package/dist/cjs/model/enum/TextFormat.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +79 -14
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +28 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +4 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +4 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +5 -5
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +7 -7
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +7 -9
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +4 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +5 -5
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +6 -6
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +1 -1
- 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/TitleTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +16 -16
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.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 +40 -51
- package/dist/cjs/parser/json/JsonParser.js.map +1 -1
- package/dist/esm/ast/Builder.js +41 -39
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/config/raw/bits.js +11 -0
- package/dist/esm/config/raw/bits.js.map +1 -1
- package/dist/esm/config/raw/groups.js +11 -10
- package/dist/esm/config/raw/groups.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +13 -3
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/esm/generator/json/JsonGenerator.js +119 -47
- package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
- package/dist/esm/model/ast/NodeType.js +8 -4
- package/dist/esm/model/ast/NodeType.js.map +1 -1
- package/dist/esm/model/enum/BitType.js +1 -0
- package/dist/esm/model/enum/BitType.js.map +1 -1
- package/dist/esm/model/enum/TextFormat.js +2 -1
- package/dist/esm/model/enum/TextFormat.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +79 -14
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +28 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +4 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +4 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +5 -5
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +7 -7
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +7 -9
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +4 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +5 -5
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +6 -6
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +1 -1
- 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/TitleTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +16 -16
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.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 +40 -51
- package/dist/esm/parser/json/JsonParser.js.map +1 -1
- package/dist/types/ast/Builder.d.ts +38 -2
- package/dist/types/ast/Builder.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/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +4 -0
- package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
- package/dist/types/model/ast/NodeType.d.ts +16 -8
- package/dist/types/model/ast/NodeType.d.ts.map +1 -1
- package/dist/types/model/ast/Nodes.d.ts +4 -2
- package/dist/types/model/ast/Nodes.d.ts.map +1 -1
- package/dist/types/model/enum/BitType.d.ts +2 -0
- package/dist/types/model/enum/BitType.d.ts.map +1 -1
- package/dist/types/model/enum/TextFormat.d.ts +2 -0
- package/dist/types/model/enum/TextFormat.d.ts.map +1 -1
- package/dist/types/model/json/BitJson.d.ts +24 -0
- package/dist/types/model/json/BitJson.d.ts.map +1 -1
- package/dist/types/model/json/BodyBitJson.d.ts +8 -0
- package/dist/types/model/json/BodyBitJson.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +12 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +4 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +2 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -304,7 +304,7 @@ class JsonGenerator {
|
|
|
304
304
|
// bitmarkAst -> bits -> bitsValue -> itemLead
|
|
305
305
|
enter_itemLead(node, parent, _route) {
|
|
306
306
|
const itemLead = node.value;
|
|
307
|
-
const { item, lead } = itemLead;
|
|
307
|
+
const { item, lead, pageNumber, marginNumber } = itemLead;
|
|
308
308
|
// Ignore item / lead that are not at the bit level as they are handled elsewhere
|
|
309
309
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
310
310
|
return;
|
|
@@ -314,6 +314,12 @@ class JsonGenerator {
|
|
|
314
314
|
if (lead != null) {
|
|
315
315
|
this.bitJson.lead = this.convertBreakscapedStringToJsonText(lead, TextFormat.bitmarkMinusMinus);
|
|
316
316
|
}
|
|
317
|
+
if (pageNumber != null) {
|
|
318
|
+
this.bitJson.pageNumber = this.convertBreakscapedStringToJsonText(pageNumber, TextFormat.bitmarkMinusMinus);
|
|
319
|
+
}
|
|
320
|
+
if (marginNumber != null) {
|
|
321
|
+
this.bitJson.marginNumber = this.convertBreakscapedStringToJsonText(marginNumber, TextFormat.bitmarkMinusMinus);
|
|
322
|
+
}
|
|
317
323
|
}
|
|
318
324
|
// bitmarkAst -> bits -> bitsValue -> extraProperties
|
|
319
325
|
enter_extraProperties(node, _parent, _route) {
|
|
@@ -348,6 +354,13 @@ class JsonGenerator {
|
|
|
348
354
|
}
|
|
349
355
|
// Create this list item
|
|
350
356
|
this.listItem = Object.assign(Object.assign({}, this.toItemLeadHintInstruction(node.value)), { body: this.bodyDefault });
|
|
357
|
+
// Delete unwanted properties
|
|
358
|
+
const nv = node.value;
|
|
359
|
+
const li = this.listItem;
|
|
360
|
+
if (nv.pageNumber == null)
|
|
361
|
+
delete li.pageNumber;
|
|
362
|
+
if (nv.marginNumber == null)
|
|
363
|
+
delete li.marginNumber;
|
|
351
364
|
listItems.push(this.listItem);
|
|
352
365
|
}
|
|
353
366
|
exit_cardBitsValue(_node, _parent, _route) {
|
|
@@ -483,7 +496,7 @@ class JsonGenerator {
|
|
|
483
496
|
}
|
|
484
497
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue
|
|
485
498
|
enter_flashcards(node, parent, _route) {
|
|
486
|
-
var _a, _b, _c, _d;
|
|
499
|
+
var _a, _b, _c, _d, _e, _f;
|
|
487
500
|
const flashcards = node.value;
|
|
488
501
|
// Ignore responses that are not at the correct level as they are potentially handled elsewhere
|
|
489
502
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
@@ -499,6 +512,10 @@ class JsonGenerator {
|
|
|
499
512
|
// Delete unwanted properties
|
|
500
513
|
if (((_d = c.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
501
514
|
delete flashcardJson.lead;
|
|
515
|
+
if (((_e = c.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
516
|
+
delete flashcardJson.pageNumber;
|
|
517
|
+
if (((_f = c.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
518
|
+
delete flashcardJson.marginNumber;
|
|
502
519
|
flashcardsJson.push(flashcardJson);
|
|
503
520
|
}
|
|
504
521
|
}
|
|
@@ -520,7 +537,7 @@ class JsonGenerator {
|
|
|
520
537
|
}
|
|
521
538
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> statements -> statementsValue
|
|
522
539
|
enter_statements(node, parent, _route) {
|
|
523
|
-
var _a, _b, _c;
|
|
540
|
+
var _a, _b, _c, _d, _e;
|
|
524
541
|
const statements = node.value;
|
|
525
542
|
// Ignore statements that are not at the card node level as they are handled elsewhere
|
|
526
543
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
@@ -538,6 +555,10 @@ class JsonGenerator {
|
|
|
538
555
|
delete statementJson.item;
|
|
539
556
|
if (((_c = s.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
540
557
|
delete statementJson.lead;
|
|
558
|
+
if (((_d = s.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
559
|
+
delete statementJson.pageNumber;
|
|
560
|
+
if (((_e = s.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
561
|
+
delete statementJson.marginNumber;
|
|
541
562
|
if ((s === null || s === void 0 ? void 0 : s.hint) == null)
|
|
542
563
|
delete statementJson.hint;
|
|
543
564
|
if ((s === null || s === void 0 ? void 0 : s.instruction) == null)
|
|
@@ -552,7 +573,7 @@ class JsonGenerator {
|
|
|
552
573
|
// bitmarkAst -> bits -> bitsValue -> choices
|
|
553
574
|
// X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> choices
|
|
554
575
|
enter_choices(node, parent, _route) {
|
|
555
|
-
var _a, _b, _c;
|
|
576
|
+
var _a, _b, _c, _d, _e;
|
|
556
577
|
const choices = node.value;
|
|
557
578
|
// Ignore choices that are not at the bit level as they are handled elsewhere as quizzes
|
|
558
579
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
@@ -568,6 +589,10 @@ class JsonGenerator {
|
|
|
568
589
|
// Delete unwanted properties
|
|
569
590
|
if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
570
591
|
delete choiceJson.lead;
|
|
592
|
+
if (((_d = c.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
593
|
+
delete choiceJson.pageNumber;
|
|
594
|
+
if (((_e = c.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
595
|
+
delete choiceJson.marginNumber;
|
|
571
596
|
choicesJson.push(choiceJson);
|
|
572
597
|
}
|
|
573
598
|
}
|
|
@@ -578,7 +603,7 @@ class JsonGenerator {
|
|
|
578
603
|
// bitmarkAst -> bits -> bitsValue -> responses
|
|
579
604
|
// X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> responses
|
|
580
605
|
enter_responses(node, parent, _route) {
|
|
581
|
-
var _a, _b, _c;
|
|
606
|
+
var _a, _b, _c, _d, _e;
|
|
582
607
|
const responses = node.value;
|
|
583
608
|
// Ignore responses that are not at the correct level as they are handled elsewhere as quizzes
|
|
584
609
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
@@ -594,6 +619,10 @@ class JsonGenerator {
|
|
|
594
619
|
// Delete unwanted properties
|
|
595
620
|
if (((_c = r.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
596
621
|
delete responseJson.lead;
|
|
622
|
+
if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
623
|
+
delete responseJson.pageNumber;
|
|
624
|
+
if (((_e = r.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
625
|
+
delete responseJson.marginNumber;
|
|
597
626
|
responsesJson.push(responseJson);
|
|
598
627
|
}
|
|
599
628
|
}
|
|
@@ -603,7 +632,7 @@ class JsonGenerator {
|
|
|
603
632
|
}
|
|
604
633
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes
|
|
605
634
|
enter_quizzes(node, _parent, _route) {
|
|
606
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
635
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
607
636
|
const quizzes = node.value;
|
|
608
637
|
const quizzesJson = [];
|
|
609
638
|
if (quizzes) {
|
|
@@ -620,6 +649,10 @@ class JsonGenerator {
|
|
|
620
649
|
// Delete unwanted properties
|
|
621
650
|
if (((_c = q.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
622
651
|
delete choiceJson.lead;
|
|
652
|
+
if (((_d = q.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
653
|
+
delete choiceJson.pageNumber;
|
|
654
|
+
if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
655
|
+
delete choiceJson.marginNumber;
|
|
623
656
|
choicesJson.push(choiceJson);
|
|
624
657
|
}
|
|
625
658
|
}
|
|
@@ -628,21 +661,29 @@ class JsonGenerator {
|
|
|
628
661
|
if (q.responses) {
|
|
629
662
|
for (const r of q.responses) {
|
|
630
663
|
// Create the choice
|
|
631
|
-
const responseJson = Object.assign(Object.assign({ response: (
|
|
664
|
+
const responseJson = Object.assign(Object.assign({ response: (_f = Breakscape.unbreakscape(r.text)) !== null && _f !== void 0 ? _f : '', isCorrect: (_g = r.isCorrect) !== null && _g !== void 0 ? _g : false }, this.toItemLeadHintInstruction(r)), this.toExample(r, {
|
|
632
665
|
defaultExample: !!r.isCorrect,
|
|
633
666
|
isBoolean: true,
|
|
634
667
|
}));
|
|
635
668
|
// Delete unwanted properties
|
|
636
|
-
if (((
|
|
669
|
+
if (((_h = q.itemLead) === null || _h === void 0 ? void 0 : _h.lead) == null)
|
|
637
670
|
delete responseJson.lead;
|
|
671
|
+
if (((_j = q.itemLead) === null || _j === void 0 ? void 0 : _j.pageNumber) == null)
|
|
672
|
+
delete responseJson.pageNumber;
|
|
673
|
+
if (((_k = q.itemLead) === null || _k === void 0 ? void 0 : _k.marginNumber) == null)
|
|
674
|
+
delete responseJson.marginNumber;
|
|
638
675
|
responsesJson.push(responseJson);
|
|
639
676
|
}
|
|
640
677
|
}
|
|
641
678
|
// Create the quiz
|
|
642
|
-
const quizJson = Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), { isExample: (
|
|
679
|
+
const quizJson = Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), { isExample: (_l = q.isExample) !== null && _l !== void 0 ? _l : false, choices: q.choices ? choicesJson : undefined, responses: q.responses ? responsesJson : undefined });
|
|
643
680
|
// Delete unwanted properties
|
|
644
|
-
if (((
|
|
681
|
+
if (((_m = q.itemLead) === null || _m === void 0 ? void 0 : _m.lead) == null)
|
|
645
682
|
delete quizJson.lead;
|
|
683
|
+
if (((_o = q.itemLead) === null || _o === void 0 ? void 0 : _o.pageNumber) == null)
|
|
684
|
+
delete quizJson.pageNumber;
|
|
685
|
+
if (((_p = q.itemLead) === null || _p === void 0 ? void 0 : _p.marginNumber) == null)
|
|
686
|
+
delete quizJson.marginNumber;
|
|
646
687
|
quizzesJson.push(quizJson);
|
|
647
688
|
}
|
|
648
689
|
}
|
|
@@ -684,7 +725,7 @@ class JsonGenerator {
|
|
|
684
725
|
}
|
|
685
726
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs
|
|
686
727
|
enter_pairs(node, _parent, route) {
|
|
687
|
-
var _a, _b, _c, _d;
|
|
728
|
+
var _a, _b, _c, _d, _e, _f;
|
|
688
729
|
const pairs = node.value;
|
|
689
730
|
const pairsJson = [];
|
|
690
731
|
const bitType = this.getBitType(route);
|
|
@@ -700,6 +741,10 @@ class JsonGenerator {
|
|
|
700
741
|
// Delete unwanted properties
|
|
701
742
|
if (((_d = p.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
702
743
|
delete pairJson.lead;
|
|
744
|
+
if (((_e = p.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
745
|
+
delete pairJson.pageNumber;
|
|
746
|
+
if (((_f = p.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
747
|
+
delete pairJson.marginNumber;
|
|
703
748
|
if (pairJson.key) {
|
|
704
749
|
delete pairJson.keyAudio;
|
|
705
750
|
delete pairJson.keyImage;
|
|
@@ -721,7 +766,7 @@ class JsonGenerator {
|
|
|
721
766
|
}
|
|
722
767
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> matrix
|
|
723
768
|
enter_matrix(node, _parent, _route) {
|
|
724
|
-
var _a, _b, _c, _d, _e, _f;
|
|
769
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
725
770
|
const matrix = node.value;
|
|
726
771
|
const matrixJsonArray = [];
|
|
727
772
|
if (matrix) {
|
|
@@ -740,18 +785,26 @@ class JsonGenerator {
|
|
|
740
785
|
// Delete unwanted properties
|
|
741
786
|
if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
742
787
|
delete matrixCellJson.lead;
|
|
788
|
+
if (((_d = c.itemLead) === null || _d === void 0 ? void 0 : _d.pageNumber) == null)
|
|
789
|
+
delete matrixCellJson.pageNumber;
|
|
790
|
+
if (((_e = c.itemLead) === null || _e === void 0 ? void 0 : _e.marginNumber) == null)
|
|
791
|
+
delete matrixCellJson.marginNumber;
|
|
743
792
|
if (c.hint == null)
|
|
744
793
|
delete matrixCellJson.hint;
|
|
745
794
|
matrixCellsJson.push(matrixCellJson);
|
|
746
795
|
}
|
|
747
796
|
}
|
|
748
797
|
// Create the matrix
|
|
749
|
-
const matrixJson = Object.assign(Object.assign({ key: (
|
|
798
|
+
const matrixJson = Object.assign(Object.assign({ key: (_f = Breakscape.unbreakscape(m.key)) !== null && _f !== void 0 ? _f : '', cells: matrixCellsJson !== null && matrixCellsJson !== void 0 ? matrixCellsJson : [] }, this.toItemLeadHintInstruction(m)), {
|
|
750
799
|
// ...this.toExample(m.example, m.isExample),
|
|
751
|
-
isExample: (
|
|
800
|
+
isExample: (_g = m.isExample) !== null && _g !== void 0 ? _g : false });
|
|
752
801
|
// Delete unwanted properties
|
|
753
|
-
if (((
|
|
802
|
+
if (((_h = m.itemLead) === null || _h === void 0 ? void 0 : _h.lead) == null)
|
|
754
803
|
delete matrixJson.lead;
|
|
804
|
+
if (((_j = m.itemLead) === null || _j === void 0 ? void 0 : _j.pageNumber) == null)
|
|
805
|
+
delete matrixJson.pageNumber;
|
|
806
|
+
if (((_k = m.itemLead) === null || _k === void 0 ? void 0 : _k.marginNumber) == null)
|
|
807
|
+
delete matrixJson.marginNumber;
|
|
755
808
|
if (m.instruction == null)
|
|
756
809
|
delete matrixJson.instruction;
|
|
757
810
|
matrixJsonArray.push(matrixJson);
|
|
@@ -763,7 +816,7 @@ class JsonGenerator {
|
|
|
763
816
|
}
|
|
764
817
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions
|
|
765
818
|
enter_questions(node, _parent, _route) {
|
|
766
|
-
var _a, _b, _c, _d;
|
|
819
|
+
var _a, _b, _c, _d, _e, _f;
|
|
767
820
|
const questions = node.value;
|
|
768
821
|
const questionsJson = [];
|
|
769
822
|
if (questions) {
|
|
@@ -776,6 +829,10 @@ class JsonGenerator {
|
|
|
776
829
|
// Delete unwanted properties
|
|
777
830
|
if (((_d = q.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
778
831
|
delete questionJson.lead;
|
|
832
|
+
if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
833
|
+
delete questionJson.pageNumber;
|
|
834
|
+
if (((_f = q.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
835
|
+
delete questionJson.marginNumber;
|
|
779
836
|
questionsJson.push(questionJson);
|
|
780
837
|
}
|
|
781
838
|
}
|
|
@@ -785,7 +842,7 @@ class JsonGenerator {
|
|
|
785
842
|
}
|
|
786
843
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses
|
|
787
844
|
enter_botResponses(node, parent, _route) {
|
|
788
|
-
var _a, _b, _c, _d;
|
|
845
|
+
var _a, _b, _c, _d, _e, _f;
|
|
789
846
|
const botResponses = node.value;
|
|
790
847
|
// Ignore responses that are not at the cardNode level as they are handled elsewhere
|
|
791
848
|
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
@@ -798,6 +855,10 @@ class JsonGenerator {
|
|
|
798
855
|
// Delete unwanted properties
|
|
799
856
|
if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
800
857
|
delete responseJson.lead;
|
|
858
|
+
if (((_e = r.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) == null)
|
|
859
|
+
delete responseJson.pageNumber;
|
|
860
|
+
if (((_f = r.itemLead) === null || _f === void 0 ? void 0 : _f.marginNumber) == null)
|
|
861
|
+
delete responseJson.marginNumber;
|
|
801
862
|
if (r.hint == null)
|
|
802
863
|
delete responseJson.hint;
|
|
803
864
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1035,8 +1096,9 @@ class JsonGenerator {
|
|
|
1035
1096
|
isBoolean: false,
|
|
1036
1097
|
})), { solutions: Breakscape.unbreakscape(data.solutions) });
|
|
1037
1098
|
// Remove unwanted properties
|
|
1038
|
-
if (!gapJson.lead
|
|
1039
|
-
|
|
1099
|
+
// if (!data.itemLead?.lead) delete gapJson.lead;
|
|
1100
|
+
// if (!data.itemLead?.pageNumber) delete gapJson.pageNumber;
|
|
1101
|
+
// if (!data.itemLead?.marginNumber) delete gapJson.marginNumber;
|
|
1040
1102
|
return gapJson;
|
|
1041
1103
|
}
|
|
1042
1104
|
createMarkJson(mark) {
|
|
@@ -1047,8 +1109,9 @@ class JsonGenerator {
|
|
|
1047
1109
|
isBoolean: true,
|
|
1048
1110
|
}));
|
|
1049
1111
|
// Remove unwanted properties
|
|
1050
|
-
if (!markJson.lead
|
|
1051
|
-
|
|
1112
|
+
// if (!data.itemLead?.lead) delete markJson.lead;
|
|
1113
|
+
// if (!data.itemLead?.pageNumber) delete markJson.pageNumber;
|
|
1114
|
+
// if (!data.itemLead?.marginNumber) delete markJson.marginNumber;
|
|
1052
1115
|
return markJson;
|
|
1053
1116
|
}
|
|
1054
1117
|
createSelectJson(select) {
|
|
@@ -1062,19 +1125,19 @@ class JsonGenerator {
|
|
|
1062
1125
|
isBoolean: true,
|
|
1063
1126
|
}));
|
|
1064
1127
|
// Remove unwanted properties
|
|
1065
|
-
if (!optionJson.item
|
|
1066
|
-
|
|
1067
|
-
if (!optionJson.
|
|
1068
|
-
|
|
1069
|
-
if (!optionJson.instruction
|
|
1070
|
-
delete optionJson.instruction;
|
|
1128
|
+
// if (!option.itemLead?.item) delete optionJson.item;
|
|
1129
|
+
// if (!option.itemLead?.lead) delete optionJson.lead;
|
|
1130
|
+
// if (!option.itemLead?.pageNumber) delete optionJson.pageNumber;
|
|
1131
|
+
// if (!option.itemLead?.marginNumber) delete optionJson.marginNumber;
|
|
1132
|
+
// if (!option.instruction) delete optionJson.instruction;
|
|
1071
1133
|
options.push(optionJson);
|
|
1072
1134
|
}
|
|
1073
1135
|
// Create the select
|
|
1074
1136
|
const selectJson = Object.assign(Object.assign({ type: 'select', prefix: (_b = Breakscape.unbreakscape(data.prefix)) !== null && _b !== void 0 ? _b : '', postfix: (_c = Breakscape.unbreakscape(data.postfix)) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(data)), { isExample: (_d = data.isExample) !== null && _d !== void 0 ? _d : false, options });
|
|
1075
1137
|
// Remove unwanted properties
|
|
1076
|
-
if (!selectJson.lead
|
|
1077
|
-
|
|
1138
|
+
// if (!data.itemLead?.lead) delete selectJson.lead;
|
|
1139
|
+
// if (!data.itemLead?.pageNumber) delete selectJson.pageNumber;
|
|
1140
|
+
// if (!data.itemLead?.marginNumber) delete selectJson.marginNumber;
|
|
1078
1141
|
return selectJson;
|
|
1079
1142
|
}
|
|
1080
1143
|
createHighlightJson(highlight) {
|
|
@@ -1088,19 +1151,17 @@ class JsonGenerator {
|
|
|
1088
1151
|
isBoolean: true,
|
|
1089
1152
|
}));
|
|
1090
1153
|
// Remove unwanted properties
|
|
1091
|
-
if (!textJson.item
|
|
1092
|
-
|
|
1093
|
-
if (!textJson.
|
|
1094
|
-
|
|
1095
|
-
if (!textJson.hint
|
|
1096
|
-
delete textJson.hint;
|
|
1154
|
+
// if (!text.itemLead?.item) delete textJson.item;
|
|
1155
|
+
// if (!text.itemLead?.lead) delete textJson.lead;
|
|
1156
|
+
// if (!text.itemLead?.pageNumber) delete textJson.pageNumber;
|
|
1157
|
+
// if (!text.itemLead?.marginNumber) delete textJson.marginNumber;
|
|
1158
|
+
// if (!text.hint) delete textJson.hint;
|
|
1097
1159
|
texts.push(textJson);
|
|
1098
1160
|
}
|
|
1099
1161
|
// Create the select
|
|
1100
1162
|
const highlightJson = Object.assign(Object.assign({ type: 'highlight', prefix: (_c = Breakscape.unbreakscape(data.prefix)) !== null && _c !== void 0 ? _c : '', postfix: (_d = Breakscape.unbreakscape(data.postfix)) !== null && _d !== void 0 ? _d : '' }, this.toItemLeadHintInstruction(data)), { isExample: (_e = data.isExample) !== null && _e !== void 0 ? _e : false, texts });
|
|
1101
1163
|
// Remove unwanted properties
|
|
1102
|
-
if (!highlightJson.lead
|
|
1103
|
-
delete highlightJson.lead;
|
|
1164
|
+
// if (!data.itemLead?.lead) delete highlightJson.lead;
|
|
1104
1165
|
return highlightJson;
|
|
1105
1166
|
}
|
|
1106
1167
|
parseResourceToJson(bitType, resource) {
|
|
@@ -1619,12 +1680,14 @@ class JsonGenerator {
|
|
|
1619
1680
|
return resourceJson;
|
|
1620
1681
|
}
|
|
1621
1682
|
toItemLeadHintInstruction(item) {
|
|
1622
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1683
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1623
1684
|
return {
|
|
1624
1685
|
item: this.convertBreakscapedStringToJsonText((_b = (_a = item.itemLead) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING, TextFormat.bitmarkMinusMinus),
|
|
1625
1686
|
lead: this.convertBreakscapedStringToJsonText((_d = (_c = item.itemLead) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : Breakscape.EMPTY_STRING, TextFormat.bitmarkMinusMinus),
|
|
1626
|
-
|
|
1627
|
-
|
|
1687
|
+
pageNumber: this.convertBreakscapedStringToJsonText((_f = (_e = item.itemLead) === null || _e === void 0 ? void 0 : _e.pageNumber) !== null && _f !== void 0 ? _f : Breakscape.EMPTY_STRING, TextFormat.bitmarkMinusMinus),
|
|
1688
|
+
marginNumber: this.convertBreakscapedStringToJsonText((_h = (_g = item.itemLead) === null || _g === void 0 ? void 0 : _g.marginNumber) !== null && _h !== void 0 ? _h : Breakscape.EMPTY_STRING, TextFormat.bitmarkMinusMinus),
|
|
1689
|
+
hint: this.convertBreakscapedStringToJsonText((_j = item.hint) !== null && _j !== void 0 ? _j : Breakscape.EMPTY_STRING, TextFormat.bitmarkMinusMinus),
|
|
1690
|
+
instruction: this.convertBreakscapedStringToJsonText((_k = item.instruction) !== null && _k !== void 0 ? _k : Breakscape.EMPTY_STRING, TextFormat.bitmarkMinusMinus),
|
|
1628
1691
|
};
|
|
1629
1692
|
}
|
|
1630
1693
|
toExample(node, options) {
|
|
@@ -1766,6 +1829,8 @@ class JsonGenerator {
|
|
|
1766
1829
|
* Input:
|
|
1767
1830
|
* - breakscaped string
|
|
1768
1831
|
* Output:
|
|
1832
|
+
* - text: plain text
|
|
1833
|
+
* - json: bitmark text JSON
|
|
1769
1834
|
* - Bitmark v2: breakscaped string
|
|
1770
1835
|
* - Bitmark v3: bitmark text JSON (TextAst)
|
|
1771
1836
|
*
|
|
@@ -1777,7 +1842,8 @@ class JsonGenerator {
|
|
|
1777
1842
|
convertBreakscapedStringToJsonText(text, format) {
|
|
1778
1843
|
if (!text)
|
|
1779
1844
|
undefined;
|
|
1780
|
-
|
|
1845
|
+
const asPlainText = this.options.textAsPlainText || format === TextFormat.text || format === TextFormat.json;
|
|
1846
|
+
if (asPlainText) {
|
|
1781
1847
|
return text || Breakscape.EMPTY_STRING;
|
|
1782
1848
|
}
|
|
1783
1849
|
// Use the text parser to parse the text
|
|
@@ -1867,6 +1933,8 @@ class JsonGenerator {
|
|
|
1867
1933
|
ageRange: undefined,
|
|
1868
1934
|
lang: undefined,
|
|
1869
1935
|
language: undefined,
|
|
1936
|
+
publisher: undefined,
|
|
1937
|
+
theme: undefined,
|
|
1870
1938
|
computerLanguage: undefined,
|
|
1871
1939
|
target: undefined,
|
|
1872
1940
|
tag: undefined,
|
|
@@ -1877,13 +1945,11 @@ class JsonGenerator {
|
|
|
1877
1945
|
subtype: undefined,
|
|
1878
1946
|
bookAlias: undefined,
|
|
1879
1947
|
coverImage: undefined,
|
|
1880
|
-
publisher: undefined,
|
|
1881
1948
|
publications: undefined,
|
|
1882
1949
|
author: undefined,
|
|
1883
1950
|
subject: undefined,
|
|
1884
1951
|
date: undefined,
|
|
1885
1952
|
location: undefined,
|
|
1886
|
-
theme: undefined,
|
|
1887
1953
|
kind: undefined,
|
|
1888
1954
|
action: undefined,
|
|
1889
1955
|
thumbImage: undefined,
|
|
@@ -1926,6 +1992,8 @@ class JsonGenerator {
|
|
|
1926
1992
|
// Item, Lead, Hint, Instruction
|
|
1927
1993
|
item: undefined,
|
|
1928
1994
|
lead: undefined,
|
|
1995
|
+
pageNumber: undefined,
|
|
1996
|
+
marginNumber: undefined,
|
|
1929
1997
|
hint: undefined,
|
|
1930
1998
|
instruction: undefined,
|
|
1931
1999
|
// Example
|
|
@@ -2239,6 +2307,10 @@ class JsonGenerator {
|
|
|
2239
2307
|
delete bitJson.lang;
|
|
2240
2308
|
if (bitJson.language == null)
|
|
2241
2309
|
delete bitJson.language;
|
|
2310
|
+
if (bitJson.publisher == null)
|
|
2311
|
+
delete bitJson.publisher;
|
|
2312
|
+
if (bitJson.theme == null)
|
|
2313
|
+
delete bitJson.theme;
|
|
2242
2314
|
if (bitJson.computerLanguage == null)
|
|
2243
2315
|
delete bitJson.computerLanguage;
|
|
2244
2316
|
if (bitJson.target == null)
|
|
@@ -2259,8 +2331,6 @@ class JsonGenerator {
|
|
|
2259
2331
|
delete bitJson.bookAlias;
|
|
2260
2332
|
if (bitJson.coverImage == null)
|
|
2261
2333
|
delete bitJson.coverImage;
|
|
2262
|
-
if (bitJson.publisher == null)
|
|
2263
|
-
delete bitJson.publisher;
|
|
2264
2334
|
if (bitJson.publications == null)
|
|
2265
2335
|
delete bitJson.publications;
|
|
2266
2336
|
if (bitJson.author == null)
|
|
@@ -2271,8 +2341,6 @@ class JsonGenerator {
|
|
|
2271
2341
|
delete bitJson.date;
|
|
2272
2342
|
if (bitJson.location == null)
|
|
2273
2343
|
delete bitJson.location;
|
|
2274
|
-
if (bitJson.theme == null)
|
|
2275
|
-
delete bitJson.theme;
|
|
2276
2344
|
if (bitJson.kind == null)
|
|
2277
2345
|
delete bitJson.kind;
|
|
2278
2346
|
if (bitJson.action == null)
|
|
@@ -2353,6 +2421,10 @@ class JsonGenerator {
|
|
|
2353
2421
|
delete bitJson.item;
|
|
2354
2422
|
if (bitJson.lead == null)
|
|
2355
2423
|
delete bitJson.lead;
|
|
2424
|
+
if (bitJson.pageNumber == null)
|
|
2425
|
+
delete bitJson.pageNumber;
|
|
2426
|
+
if (bitJson.marginNumber == null)
|
|
2427
|
+
delete bitJson.marginNumber;
|
|
2356
2428
|
if (bitJson.hint == null)
|
|
2357
2429
|
delete bitJson.hint;
|
|
2358
2430
|
if (bitJson.instruction == null)
|