@gmb/bitmark-parser-generator 3.7.0 → 3.10.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/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/BitmarkParserGenerator.js +1 -0
- package/dist/cjs/BitmarkParserGenerator.js.map +1 -1
- package/dist/cjs/ast/BaseBuilder.js +7 -6
- package/dist/cjs/ast/BaseBuilder.js.map +1 -1
- package/dist/cjs/ast/Builder.js +165 -160
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/ast/ResourceBuilder.js +68 -67
- package/dist/cjs/ast/ResourceBuilder.js.map +1 -1
- package/dist/cjs/breakscaping/Breakscape.js +1 -1
- package/dist/cjs/config/raw/bits.js +41 -0
- package/dist/cjs/config/raw/bits.js.map +1 -1
- package/dist/cjs/config/raw/groups.js +35 -0
- package/dist/cjs/config/raw/groups.js.map +1 -1
- package/dist/cjs/config/raw/properties.js +48 -0
- package/dist/cjs/config/raw/properties.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generated/build-info.js.map +1 -1
- package/dist/cjs/generated/parser/text/text-peggy-parser.js +960 -595
- package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +1 -1
- package/dist/cjs/generator/json/JsonGenerator.js +7 -3
- package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
- package/dist/cjs/generator/text/TextGenerator.js +84 -38
- package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
- package/dist/cjs/model/ast/NodeType.js +19 -0
- package/dist/cjs/model/ast/NodeType.js.map +1 -1
- package/dist/cjs/model/config/enum/PropertyConfigKey.js +10 -0
- package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
- package/dist/cjs/model/enum/BitType.js +7 -0
- package/dist/cjs/model/enum/BitType.js.map +1 -1
- package/dist/cjs/model/enum/TextMarkType.js +2 -0
- package/dist/cjs/model/enum/TextMarkType.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +28 -20
- 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 +11 -10
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +5 -6
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +5 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +3 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +5 -4
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +20 -12
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.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/InternalCommentTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +5 -5
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +6 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +6 -6
- 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/MarkTagContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +19 -13
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +4 -3
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.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 +11 -10
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +2 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +6 -2
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +19 -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/text/TextParser.js +7 -6
- package/dist/cjs/parser/text/TextParser.js.map +1 -1
- package/dist/cjs/utils/BitUtils.js +2 -2
- package/dist/cjs/utils/BitUtils.js.map +1 -1
- package/dist/esm/BitmarkParserGenerator.js +1 -0
- package/dist/esm/BitmarkParserGenerator.js.map +1 -1
- package/dist/esm/ast/BaseBuilder.js +7 -6
- package/dist/esm/ast/BaseBuilder.js.map +1 -1
- package/dist/esm/ast/Builder.js +165 -160
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/ast/ResourceBuilder.js +68 -67
- package/dist/esm/ast/ResourceBuilder.js.map +1 -1
- package/dist/esm/breakscaping/Breakscape.js +1 -1
- package/dist/esm/config/raw/bits.js +41 -0
- package/dist/esm/config/raw/bits.js.map +1 -1
- package/dist/esm/config/raw/groups.js +35 -0
- package/dist/esm/config/raw/groups.js.map +1 -1
- package/dist/esm/config/raw/properties.js +48 -0
- package/dist/esm/config/raw/properties.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generated/build-info.js.map +1 -1
- package/dist/esm/generated/parser/text/text-peggy-parser.js +960 -595
- package/dist/esm/generated/parser/text/text-peggy-parser.js.map +1 -1
- package/dist/esm/generator/json/JsonGenerator.js +7 -3
- package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
- package/dist/esm/generator/text/TextGenerator.js +84 -38
- package/dist/esm/generator/text/TextGenerator.js.map +1 -1
- package/dist/esm/model/ast/NodeType.js +19 -0
- package/dist/esm/model/ast/NodeType.js.map +1 -1
- package/dist/esm/model/config/enum/PropertyConfigKey.js +10 -0
- package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
- package/dist/esm/model/enum/BitType.js +7 -0
- package/dist/esm/model/enum/BitType.js.map +1 -1
- package/dist/esm/model/enum/TextMarkType.js +2 -0
- package/dist/esm/model/enum/TextMarkType.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +28 -20
- 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 +11 -10
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +5 -6
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +5 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +3 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +5 -4
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +20 -12
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.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/InternalCommentTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +5 -5
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +6 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +6 -6
- 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/MarkTagContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +19 -13
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +4 -3
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.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 +11 -10
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +2 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +6 -2
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +19 -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/text/TextParser.js +7 -6
- package/dist/esm/parser/text/TextParser.js.map +1 -1
- package/dist/esm/utils/BitUtils.js +2 -2
- package/dist/esm/utils/BitUtils.js.map +1 -1
- package/dist/types/BitmarkParserGenerator.d.ts.map +1 -1
- package/dist/types/ast/BaseBuilder.d.ts +8 -1
- package/dist/types/ast/BaseBuilder.d.ts.map +1 -1
- package/dist/types/ast/Builder.d.ts +60 -50
- package/dist/types/ast/Builder.d.ts.map +1 -1
- package/dist/types/ast/ResourceBuilder.d.ts +21 -22
- package/dist/types/ast/ResourceBuilder.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/generated/parser/text/text-peggy-parser.d.ts.map +1 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +3 -1
- package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
- package/dist/types/generator/text/TextGenerator.d.ts +4 -1
- package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
- package/dist/types/model/ast/NodeType.d.ts +38 -0
- package/dist/types/model/ast/NodeType.d.ts.map +1 -1
- package/dist/types/model/ast/Nodes.d.ts +10 -0
- package/dist/types/model/ast/Nodes.d.ts.map +1 -1
- package/dist/types/model/ast/TextNodes.d.ts +26 -9
- package/dist/types/model/ast/TextNodes.d.ts.map +1 -1
- package/dist/types/model/config/enum/ConfigKey.d.ts +20 -0
- package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts +30 -0
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
- package/dist/types/model/enum/BitType.d.ts +14 -0
- package/dist/types/model/enum/BitType.d.ts.map +1 -1
- package/dist/types/model/enum/PropertyTag.d.ts +20 -0
- package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
- package/dist/types/model/enum/TextMarkType.d.ts +4 -0
- package/dist/types/model/enum/TextMarkType.d.ts.map +1 -1
- package/dist/types/model/json/BitJson.d.ts +10 -0
- package/dist/types/model/json/BitJson.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +0 -2
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +6 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +3 -4
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts +1 -2
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts +1 -2
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +3 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +1 -2
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +1 -3
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -1
- package/dist/types/parser/text/TextParser.d.ts +3 -2
- package/dist/types/parser/text/TextParser.d.ts.map +1 -1
- package/dist/types/utils/BitUtils.d.ts +2 -1
- package/dist/types/utils/BitUtils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"ExampleTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAWtD,iCAAiC;AACjC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;AAEpC,SAAS,0BAA0B,CACjC,OAAgC,EAChC,aAA+B,EAC/B,OAAmB,EACnB,MAAiC;IAEjC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,KAAK,EAAE,GAAG,OAAoB,CAAC;IACvC,MAAM,OAAO,GAAG,KAAoC,CAAC;IAErD,iDAAiD;IACjD,IACE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE;QAC1B,OAAO,CAAC,KAAK;QACb,OAAO,CAAC,0BAA0B;QAClC,OAAO,CAAC,kBAAkB;QAC1B,OAAO,CAAC,aAAa;QACrB,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,UAAU;QAClB,OAAO,CAAC,gBAAgB;QACxB,OAAO,CAAC,iBAAiB;QACzB,OAAO,CAAC,cAAc;QACtB,OAAO,CAAC,eAAe;KACxB,CAAC,EACF,CAAC;QACD,EAAE;QACF,mCAAmC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM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GAAG,IAAI,CAAC;YACjC,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;YAC3B,OAAO,CAAC,UAAU,CAAC,iEAAiE,EAAE,OAAO,CAAC,CAAC;QACjG,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,2BAA2B,CAClC,OAAgC,EAChC,QAAoB,EACpB,OAAoC,EACpC,MAAiC;IAEjC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAC/B,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QAC3C,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAC;QACjC,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrG,CAAC;AACH,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -6,7 +6,8 @@ import { BitmarkPegParserValidator } from '../BitmarkPegParserValidator';
|
|
|
6
6
|
import { ContentProcessorUtils } from './ContentProcessorUtils';
|
|
7
7
|
const textParser = new TextParser();
|
|
8
8
|
class FooterContentProcessor {
|
|
9
|
-
process(context, contentDepth,
|
|
9
|
+
process(context, contentDepth, _tagsConfig, _target, footer, footerPlainText) {
|
|
10
|
+
const { textFormat } = context;
|
|
10
11
|
let finalFooterText;
|
|
11
12
|
footer = footer.trimStart();
|
|
12
13
|
footerPlainText = footerPlainText.trimEnd();
|
|
@@ -23,12 +24,13 @@ class FooterContentProcessor {
|
|
|
23
24
|
if (footer || footerPlainText) {
|
|
24
25
|
const isBitmarkText = textFormat === TextFormat.bitmarkMinusMinus || textFormat === TextFormat.bitmarkPlusPlus;
|
|
25
26
|
if (footer) {
|
|
26
|
-
footer = BitmarkPegParserValidator.checkFooter(context, contentDepth,
|
|
27
|
+
footer = BitmarkPegParserValidator.checkFooter(context, contentDepth, footer);
|
|
27
28
|
}
|
|
28
29
|
const parsedFooterText = isBitmarkText
|
|
29
30
|
? textParser.toAst(footer, {
|
|
30
31
|
//
|
|
31
32
|
textFormat,
|
|
33
|
+
isProperty: false,
|
|
32
34
|
})
|
|
33
35
|
: Breakscape.unbreakscape(footer, {
|
|
34
36
|
textFormat: TextFormat.text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FooterContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/FooterContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"FooterContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/FooterContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKjE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAOhE,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;AAEpC,MAAM,sBAAsB;IACnB,OAAO,CACZ,OAAgC,EAChC,YAA8B,EAC9B,WAAmC,EACnC,OAAkC,EAClC,MAAyB,EACzB,eAAkC;QAElC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAC/B,IAAI,eAAqC,CAAC;QAE1C,MAAM,GAAG,MAAM,CAAC,SAAS,EAAuB,CAAC;QACjD,eAAe,GAAG,eAAe,CAAC,OAAO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,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,sBAAsB,EAAE,CAAC;AAC9C,OAAO,EAAE,QAAQ,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -3,23 +3,23 @@ import { BodyBitType } from '../../../../model/enum/BodyBitType';
|
|
|
3
3
|
import { Tag } from '../../../../model/enum/Tag';
|
|
4
4
|
import { clozeTagContentProcessor } from './ClozeTagContentProcessor';
|
|
5
5
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
6
|
-
function gapChainContentProcessor(context, contentDepth,
|
|
6
|
+
function gapChainContentProcessor(context, contentDepth, tagsConfig, content, target, bodyParts) {
|
|
7
7
|
if (contentDepth === BitContentLevel.Chain) {
|
|
8
|
-
clozeTagContentProcessor(context, contentDepth,
|
|
8
|
+
clozeTagContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
9
9
|
}
|
|
10
10
|
else {
|
|
11
|
-
const gap = buildGap(context, contentDepth,
|
|
11
|
+
const gap = buildGap(context, contentDepth, tagsConfig, content);
|
|
12
12
|
if (gap)
|
|
13
13
|
bodyParts.push(gap);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function buildGap(context, _contentDepth,
|
|
16
|
+
function buildGap(context, _contentDepth, tagsConfig, content) {
|
|
17
17
|
var _a;
|
|
18
18
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
19
19
|
context.debugPrint('gap content', content);
|
|
20
20
|
const gapConfig = Config.getTagConfigForTag(tagsConfig, Tag.fromValue(content.type));
|
|
21
21
|
const chainContent = [content, ...((_a = content.chain) !== null && _a !== void 0 ? _a : [])];
|
|
22
|
-
const chainTags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
22
|
+
const chainTags = context.bitContentProcessor(BitContentLevel.Chain, gapConfig === null || gapConfig === void 0 ? void 0 : gapConfig.chain, chainContent);
|
|
23
23
|
if (context.DEBUG_CHAIN_TAGS)
|
|
24
24
|
context.debugPrint('gap TAGS', chainTags);
|
|
25
25
|
const gap = Object.assign({ type: BodyBitType.gap }, chainTags);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GapChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"GapChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAGjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAEL,eAAe,GAIhB,MAAM,0BAA0B,CAAC;AAElC,SAAS,wBAAwB,CAC/B,OAAgC,EAChC,YAA8B,EAC9B,UAAkC,EAClC,OAAmB,EACnB,MAAiC,EACjC,SAAqB;IAErB,IAAI,YAAY,KAAK,eAAe,CAAC,KAAK,EAAE,CAAC;QAC3C,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/E,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,GAAiC,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/F,IAAI,GAAG;YAAE,SAAS,CAAC,IAAI,CAAC,GAAe,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CACf,OAAgC,EAChC,aAA+B,EAC/B,UAAkC,EAClC,OAAmB;;IAEnB,IAAI,OAAO,CAAC,mBAAmB;QAAE,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAE5E,MAAM,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAErF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,KAAK,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,EAAE,YAAY,CAAC,CAAC;IAErG,IAAI,OAAO,CAAC,gBAAgB;QAAE,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAExE,MAAM,GAAG,mBACP,IAAI,EAAE,WAAW,CAAC,GAAG,IAClB,SAAS,CACb,CAAC;IAEF,OAAO,GAAG,CAAC;AACb,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -14,27 +14,27 @@ import { Config } from '../../../../config/Config';
|
|
|
14
14
|
import { PropertyTag } from '../../../../model/enum/PropertyTag';
|
|
15
15
|
import { StringUtils } from '../../../../utils/StringUtils';
|
|
16
16
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
17
|
-
function imageSourceChainContentProcessor(context, contentDepth,
|
|
17
|
+
function imageSourceChainContentProcessor(context, contentDepth, tagsConfig, content, target) {
|
|
18
18
|
if (contentDepth === BitContentLevel.Chain) {
|
|
19
|
-
imageSourceTagContentProcessor(context, contentDepth,
|
|
19
|
+
imageSourceTagContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
buildImageSource(context, contentDepth,
|
|
22
|
+
buildImageSource(context, contentDepth, tagsConfig, content, target);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
function imageSourceTagContentProcessor(_context, _contentDepth,
|
|
25
|
+
function imageSourceTagContentProcessor(_context, _contentDepth, _tagsConfig, content, target) {
|
|
26
26
|
const { value } = content;
|
|
27
27
|
// Extract the url from the content tag
|
|
28
28
|
const url = Breakscape.unbreakscape(StringUtils.trimmedString(value));
|
|
29
29
|
target.imageSourceUrl = url;
|
|
30
30
|
}
|
|
31
|
-
function buildImageSource(context, _contentDepth,
|
|
31
|
+
function buildImageSource(context, _contentDepth, tagsConfig, content, target) {
|
|
32
32
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
33
33
|
context.debugPrint('imageSource content', content);
|
|
34
34
|
const { key: tag } = content;
|
|
35
35
|
const imageSourceConfig = Config.getTagConfigForTag(tagsConfig, PropertyTag.fromValue(tag));
|
|
36
|
-
const tags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
37
|
-
const chainTags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
36
|
+
const tags = context.bitContentProcessor(BitContentLevel.Chain, tagsConfig, [content]);
|
|
37
|
+
const chainTags = context.bitContentProcessor(BitContentLevel.Chain, imageSourceConfig === null || imageSourceConfig === void 0 ? void 0 : imageSourceConfig.chain, content.chain);
|
|
38
38
|
if (context.DEBUG_CHAIN_TAGS)
|
|
39
39
|
context.debugPrint('imageSource TAGS', chainTags);
|
|
40
40
|
const { imageSourceUrl: url } = tags;
|
package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageSourceChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageSourceChainContentProcessor.js","sourceRoot":"","sources":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or(_context, _contentDepth,
|
|
2
|
+
function commentTagContentProcessor(_context, _contentDepth, content, target) {
|
|
3
3
|
if (!target.internalComments)
|
|
4
4
|
return;
|
|
5
5
|
const { value } = content;
|
package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalCommentTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InternalCommentTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAU5D,SAAS,0BAA0B,CACjC,QAAiC,EACjC,aAA+B,EAC/B,OAAmB,EACnB,MAAiC;IAEjC,IAAI,CAAC,MAAM,CAAC,gBAAgB;QAAE,OAAO;IAErC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAoB,CAAC;IAEvC,MAAM,eAAe,GAAkC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChF,CAAC,CAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAuB;QACzD,CAAC,CAAC,SAAS,CAAC;IACd,IAAI,CAAC,eAAe;QAAE,OAAO;IAE7B,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAChD,CAAC;AACD,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -2,22 +2,22 @@ import { Config } from '../../../../config/Config';
|
|
|
2
2
|
import { Tag } from '../../../../model/enum/Tag';
|
|
3
3
|
import { itemLeadTagContentProcessor } from './ItemLeadTagContentProcessor';
|
|
4
4
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
5
|
-
function itemLeadChainContentProcessor(context, contentDepth,
|
|
5
|
+
function itemLeadChainContentProcessor(context, contentDepth, tagsConfig, content, target) {
|
|
6
6
|
if (contentDepth === BitContentLevel.Chain) {
|
|
7
|
-
itemLeadTagContentProcessor(context, contentDepth,
|
|
7
|
+
itemLeadTagContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
8
8
|
}
|
|
9
9
|
else {
|
|
10
|
-
buildItemLead(context, contentDepth,
|
|
10
|
+
buildItemLead(context, contentDepth, tagsConfig, content, target);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
function buildItemLead(context, _contentDepth,
|
|
13
|
+
function buildItemLead(context, _contentDepth, tagsConfig, content, target) {
|
|
14
14
|
var _a;
|
|
15
15
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
16
16
|
context.debugPrint('item lead content', content);
|
|
17
17
|
// Process the chain (lead)
|
|
18
18
|
const itemLeadConfig = Config.getTagConfigForTag(tagsConfig, Tag.fromValue(content.type));
|
|
19
19
|
const chainContent = [content, ...((_a = content.chain) !== null && _a !== void 0 ? _a : [])];
|
|
20
|
-
const chainTags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
20
|
+
const chainTags = context.bitContentProcessor(BitContentLevel.Chain, itemLeadConfig === null || itemLeadConfig === void 0 ? void 0 : itemLeadConfig.chain, chainContent);
|
|
21
21
|
if (context.DEBUG_CHAIN_TAGS)
|
|
22
22
|
context.debugPrint('item lead TAGS', chainTags);
|
|
23
23
|
// Set the lead item from the chain
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLeadChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ItemLeadChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MA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mC;IACnC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;AACvC,CAAC;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { StringUtils } from '../../../../utils/StringUtils';
|
|
2
2
|
import { TextParser } from '../../../text/TextParser';
|
|
3
|
-
function itemLeadTagContentProcessor(
|
|
3
|
+
function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
4
|
+
const { textFormat } = context;
|
|
4
5
|
const { value } = content;
|
|
5
6
|
const textParser = new TextParser();
|
|
6
7
|
const trimmedStringValue = StringUtils.trimmedString(value);
|
|
7
8
|
if (!target.itemLead)
|
|
8
9
|
target.itemLead = [];
|
|
9
|
-
const text = textParser.toAst(trimmedStringValue
|
|
10
|
+
const text = textParser.toAst(trimmedStringValue, {
|
|
11
|
+
textFormat,
|
|
12
|
+
isProperty: true,
|
|
13
|
+
});
|
|
10
14
|
target.itemLead.push(text);
|
|
11
15
|
}
|
|
12
16
|
export { itemLeadTagContentProcessor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLeadTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ItemLeadTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAUtD,SAAS,2BAA2B,CAClC,OAAgC,EAChC,aAA+B,EAC/B,WAAmC,EACnC,OAAmB,EACnB,MAAiC;IAEjC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,OAAoB,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAEpC,MAAM,kBAAkB,GAAG,WAAW,CAAC,aAAa,CAAC,KAAK,CAAsB,CAAC;IAEjF,IAAI,CAAC,MAAM,CAAC,QAAQ;QAAE,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;IAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,kBAAkB,EAAE;QAChD,UAAU;QACV,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AACD,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -15,23 +15,23 @@ import { Tag } from '../../../../model/enum/Tag';
|
|
|
15
15
|
import { ArrayUtils } from '../../../../utils/ArrayUtils';
|
|
16
16
|
import { markTagContentProcessor } from './MarkTagContentProcessor';
|
|
17
17
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
18
|
-
function markChainContentProcessor(context, contentDepth,
|
|
18
|
+
function markChainContentProcessor(context, contentDepth, tagsConfig, content, target, bodyParts) {
|
|
19
19
|
if (contentDepth === BitContentLevel.Chain) {
|
|
20
|
-
markTagContentProcessor(context, BitContentLevel.Chain,
|
|
20
|
+
markTagContentProcessor(context, BitContentLevel.Chain, content, target);
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
-
const mark = buildMark(context, contentDepth,
|
|
23
|
+
const mark = buildMark(context, contentDepth, tagsConfig, content);
|
|
24
24
|
if (mark)
|
|
25
25
|
bodyParts.push(mark);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function buildMark(context, _contentDepth,
|
|
28
|
+
function buildMark(context, _contentDepth, tagsConfig, content) {
|
|
29
29
|
var _a;
|
|
30
30
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
31
31
|
context.debugPrint('mark content', content);
|
|
32
32
|
const markConfig = Config.getTagConfigForTag(tagsConfig, Tag.fromValue(content.type));
|
|
33
|
-
const tags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
34
|
-
const chainTags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
33
|
+
const tags = context.bitContentProcessor(BitContentLevel.Chain, tagsConfig, [content]);
|
|
34
|
+
const chainTags = context.bitContentProcessor(BitContentLevel.Chain, markConfig === null || markConfig === void 0 ? void 0 : markConfig.chain, content.chain);
|
|
35
35
|
if (context.DEBUG_CHAIN_TAGS)
|
|
36
36
|
context.debugPrint('mark TAGS', chainTags);
|
|
37
37
|
const { solution } = tags;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAEL,eAAe,GAIhB,MAAM,0BAA0B,CAAC;AAElC,SAAS,yBAAyB,CAChC,OAAgC,EAChC,YAA8B,EAC9B,UAAkC,EAClC,OAAmB,EACnB,MAAiC,EACjC,SAAqB;IAErB,IAAI,YAAY,KAAK,eAAe,CAAC,KAAK,EAAE,CAAC;QAC3C,uBAAuB,CAAC,OAAO,EAAE,eAAe,CAAC,KAAK,EAAE,O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I,EAAE,IACtC,IAAI,CACR,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -14,7 +14,7 @@ import { Config } from '../../../../config/Config';
|
|
|
14
14
|
import { PropertyTag } from '../../../../model/enum/PropertyTag';
|
|
15
15
|
import { StringUtils } from '../../../../utils/StringUtils';
|
|
16
16
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
17
|
-
function markConfigChainContentProcessor(context, _contentDepth,
|
|
17
|
+
function markConfigChainContentProcessor(context, _contentDepth, tagsConfig, content, target) {
|
|
18
18
|
var _a;
|
|
19
19
|
const { key: tag } = content;
|
|
20
20
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
@@ -24,7 +24,7 @@ function markConfigChainContentProcessor(context, _contentDepth, bitType, textFo
|
|
|
24
24
|
return;
|
|
25
25
|
const markTagConfig = Config.getTagConfigForTag(tagsConfig, PropertyTag.fromValue(tag));
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
-
const _b = context.bitContentProcessor(BitContentLevel.Chain,
|
|
27
|
+
const _b = context.bitContentProcessor(BitContentLevel.Chain, markTagConfig === null || markTagConfig === void 0 ? void 0 : markTagConfig.chain, content.chain), { mark: _ignoreMark } = _b, tags = __rest(_b, ["mark"]);
|
|
28
28
|
if (context.DEBUG_CHAIN_TAGS)
|
|
29
29
|
context.debugPrint('mark TAGS', tags);
|
|
30
30
|
// Extract the name from the content tag
|
package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkConfigChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkConfigChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAEL,eAAe,GAKhB,MAAM,0BAA0B,CAAC;AAElC,SAAS,+BAA+B,CACtC,OAAgC,EAChC,aAA+B,EAC/B,UAAkC,EAClC,OAAmB,EACnB,MAAiC;;IAEjC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAuB,CAAC;IAE7C,IAAI,OAAO,CAAC,mBAAmB;QAAE,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAE7E,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAErC,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,MAAM,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAExF,6DAA6D;IAC7D,MAAM,KAAiC,OAAO,CAAC,mBAAmB,CAChE,eAAe,CAAC,KAAK,EACrB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,EACpB,OAAO,CAAC,KAAK,CACd,EAJK,EAAE,IAAI,EAAE,WAAW,OAIxB,EAJ6B,IAAI,cAA5B,QAA8B,CAInC,CAAC;IAEF,IAAI,OAAO,CAAC,gBAAgB;QAAE,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAEpE,wCAAwC;IACxC,MAAM,IAAI,GAAW,UAAU,CAAC,YAAY,CAC1C,CAAC,MAAA,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,mCAAI,SAAS,CAAsB,CAC7E,CAAC;IAEF,MAAM,MAAM,mBACV,IAAI,EACJ,QAAQ,EAAE,WAAqB,IAC5B,IAAI,CACR,CAAC;IAEF,IAAI,MAAM;QAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,OAAO,EAAE,+BAA+B,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringUtils } from '../../../../utils/StringUtils';
|
|
2
|
-
function markTagContentProcessor(_context, _contentDepth,
|
|
2
|
+
function markTagContentProcessor(_context, _contentDepth, content, target) {
|
|
3
3
|
const { value } = content;
|
|
4
4
|
if (StringUtils.isString(value)) {
|
|
5
5
|
target.solution = value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAU5D,SAAS,uBAAuB,CAC9B,QAAiC,EACjC,aAA+B,EAC/B,OAAmB,EACnB,MAAiC;IAEjC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAoB,CAAC;IAEvC,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,CAAC,QAAQ,GAAG,KAA0B,CAAC;IAC/C,CAAC;AACH,CAAC;AACD,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -2,11 +2,11 @@ import { Breakscape } from '../../../../breakscaping/Breakscape';
|
|
|
2
2
|
import { ResourceTag } from '../../../../model/enum/ResourceTag';
|
|
3
3
|
import { StringUtils } from '../../../../utils/StringUtils';
|
|
4
4
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
5
|
-
function personChainContentProcessor(context, _contentDepth,
|
|
5
|
+
function personChainContentProcessor(context, _contentDepth, tagsConfig, content, target) {
|
|
6
6
|
// const { value } = content as TypeValue;
|
|
7
7
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
8
8
|
context.debugPrint('person content', content);
|
|
9
|
-
const tags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
9
|
+
const tags = context.bitContentProcessor(BitContentLevel.Chain, tagsConfig, content.chain);
|
|
10
10
|
if (context.DEBUG_CHAIN_TAGS)
|
|
11
11
|
context.debugPrint('person TAGS', tags);
|
|
12
12
|
const { propertyTitle, resources } = tags;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"PersonChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAEL,eAAe,GAIhB,MAAM,0BAA0B,CAAC;AAElC,SAAS,2BAA2B,CAClC,OAAgC,EAChC,aAA+B,EAC/B,UAAkC,EAClC,OAAmB,EACnB,MAAiC;IAEjC,0CAA0C;IAE1C,IAAI,OAAO,CAAC,mBAAmB;QAAE,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,CA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A8C;QAC9C,OAAO,CAAC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;QAEjD,oDAAoD;QACpD,OAAO,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,MAAM,qDAAqD,CAAC,CAAC;IACrG,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -23,7 +23,7 @@ import { servingsChainContentProcessor } from './ServingsChainContentProcessor';
|
|
|
23
23
|
import { technicalTermChainContentProcessor } from './TechnicalTermChainContentProcessor';
|
|
24
24
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
25
25
|
const textParser = new TextParser();
|
|
26
|
-
function propertyContentProcessor(context, contentDepth,
|
|
26
|
+
function propertyContentProcessor(context, contentDepth, tagsConfig, content, target) {
|
|
27
27
|
const { value } = content;
|
|
28
28
|
let { key: tag } = content;
|
|
29
29
|
const isChain = contentDepth === BitContentLevel.Chain;
|
|
@@ -32,7 +32,7 @@ function propertyContentProcessor(context, contentDepth, bitType, textFormat, ta
|
|
|
32
32
|
const configKey = propertyConfig ? propertyConfig.configKey : undefined;
|
|
33
33
|
// Handle internal comments
|
|
34
34
|
if (tag === PropertyTag.internalComment) {
|
|
35
|
-
internalCommentTagContentProcessor(context, contentDepth,
|
|
35
|
+
internalCommentTagContentProcessor(context, contentDepth, content, target);
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
// Check for chains
|
|
@@ -40,35 +40,35 @@ function propertyContentProcessor(context, contentDepth, bitType, textFormat, ta
|
|
|
40
40
|
// should also be checked here if the property may occur in another bit with a different meaning.
|
|
41
41
|
if (propertyConfig) {
|
|
42
42
|
if (configKey === PropertyConfigKey.example) {
|
|
43
|
-
exampleTagContentProcessor(context, contentDepth,
|
|
43
|
+
exampleTagContentProcessor(context, contentDepth, content, target);
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
else if (configKey === PropertyConfigKey.ratingLevelStart || configKey === PropertyConfigKey.ratingLevelEnd) {
|
|
47
|
-
ratingLevelChainContentProcessor(context, contentDepth,
|
|
47
|
+
ratingLevelChainContentProcessor(context, contentDepth, propertyConfig.chain, content, target);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
else if (configKey === PropertyConfigKey.technicalTerm) {
|
|
51
|
-
technicalTermChainContentProcessor(context, contentDepth,
|
|
51
|
+
technicalTermChainContentProcessor(context, contentDepth, propertyConfig.chain, content, target);
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
else if (configKey === PropertyConfigKey.servings) {
|
|
55
|
-
servingsChainContentProcessor(context, contentDepth,
|
|
55
|
+
servingsChainContentProcessor(context, contentDepth, propertyConfig.chain, content, target);
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
else if (configKey === PropertyConfigKey.person || configKey === PropertyConfigKey.partner) {
|
|
59
|
-
personChainContentProcessor(context, contentDepth,
|
|
59
|
+
personChainContentProcessor(context, contentDepth, propertyConfig.chain, content, target);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
else if (configKey === PropertyConfigKey.imageSource) {
|
|
63
|
-
imageSourceChainContentProcessor(context, contentDepth,
|
|
63
|
+
imageSourceChainContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
else if (configKey === PropertyConfigKey.book) {
|
|
67
|
-
bookChainContentProcessor(context, contentDepth,
|
|
67
|
+
bookChainContentProcessor(context, contentDepth, propertyConfig.chain, content, target);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
else if (configKey === PropertyConfigKey.markConfig && !isChain) {
|
|
71
|
-
markConfigChainContentProcessor(context, contentDepth,
|
|
71
|
+
markConfigChainContentProcessor(context, contentDepth, tagsConfig, content, target);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
else if (configKey === PropertyConfigKey.property_title && isChain) {
|
|
@@ -76,7 +76,7 @@ function propertyContentProcessor(context, contentDepth, bitType, textFormat, ta
|
|
|
76
76
|
tag = 'propertyTitle';
|
|
77
77
|
}
|
|
78
78
|
else if (configKey === PropertyConfigKey.imagePlaceholder) {
|
|
79
|
-
propertyStyleResourceContentProcessor(context, contentDepth,
|
|
79
|
+
propertyStyleResourceContentProcessor(context, contentDepth, tagsConfig, content, target, ResourceTag.image);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -101,9 +101,15 @@ function propertyContentProcessor(context, contentDepth, bitType, textFormat, ta
|
|
|
101
101
|
case PropertyFormat.invertedBoolean:
|
|
102
102
|
return !BooleanUtils.toBoolean(Breakscape.unbreakscape(v), true);
|
|
103
103
|
case PropertyFormat.bitmarkMinusMinus:
|
|
104
|
-
return textParser.toAst(v, {
|
|
104
|
+
return textParser.toAst(v, {
|
|
105
|
+
textFormat: TextFormat.bitmarkMinusMinus,
|
|
106
|
+
isProperty: true,
|
|
107
|
+
});
|
|
105
108
|
case PropertyFormat.bitmarkPlusPlus:
|
|
106
|
-
return textParser.toAst(v, {
|
|
109
|
+
return textParser.toAst(v, {
|
|
110
|
+
textFormat: TextFormat.bitmarkPlusPlus,
|
|
111
|
+
isProperty: true,
|
|
112
|
+
});
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
return Breakscape.unbreakscape(v);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"PropertyContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,0BAA0B,IAAI,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,6BA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CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;IAClE,CAAC;IAED,uGAAuG;IACvG,sGAAsG;IACtG,iHAAiH;IACjH,IAAI,GAAG,KAAK,WAAW,CAAC,kBAAkB,EAAE,CAAC;QAC3C,WAAW,CACT,MAAM,EACN,qBAAqB,EACrB,KAAK,EACL,IAAI,iBAAiB,CACnB,SAAS,CAAC,cAAc,EACxB,WAAW,CAAC,kBAAkB,EAC9B,CAAC,EACD,CAAC,EACD,SAAS,EACT,SAAS,EACT,SAAS,EACT,IAAI,EACJ,cAAc,CAAC,iBAAiB,EAChC,SAAS,EACT,SAAS,CACV,CACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -3,12 +3,13 @@ import { NumberUtils } from '../../../../utils/NumberUtils';
|
|
|
3
3
|
import { TextParser } from '../../../text/TextParser';
|
|
4
4
|
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
5
5
|
const textParser = new TextParser();
|
|
6
|
-
function ratingLevelChainContentProcessor(context, _contentDepth,
|
|
6
|
+
function ratingLevelChainContentProcessor(context, _contentDepth, tagsConfig, content, target) {
|
|
7
7
|
var _a;
|
|
8
|
+
const { textFormat } = context;
|
|
8
9
|
const { key, value } = content;
|
|
9
10
|
if (context.DEBUG_CHAIN_CONTENT)
|
|
10
11
|
context.debugPrint('ratingLevel content', content);
|
|
11
|
-
const tags = context.bitContentProcessor(BitContentLevel.Chain,
|
|
12
|
+
const tags = context.bitContentProcessor(BitContentLevel.Chain, tagsConfig, content.chain);
|
|
12
13
|
if (context.DEBUG_CHAIN_TAGS)
|
|
13
14
|
context.debugPrint('ratingLevel TAGS', tags);
|
|
14
15
|
const { label } = tags;
|
|
@@ -16,7 +17,7 @@ function ratingLevelChainContentProcessor(context, _contentDepth, bitType, textF
|
|
|
16
17
|
const level = (_a = NumberUtils.asNumber(value)) !== null && _a !== void 0 ? _a : 0;
|
|
17
18
|
const node = {
|
|
18
19
|
level,
|
|
19
|
-
label: label ? textParser.toAst(label) : undefined,
|
|
20
|
+
label: label ? textParser.toAst(label, { textFormat, isProperty: true }) : undefined,
|
|
20
21
|
};
|
|
21
22
|
switch (key) {
|
|
22
23
|
case PropertyTag.ratingLevelStart:
|
package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RatingLevelChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RatingLevelChainContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAEL,eAAe,GAKhB,MAAM,0BAA0B,CAAC;AAElC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;AAEpC,SAAS,gCAAgC,CACvC,OAAgC,EAChC,aAA+B,EAC/B,UAAkC,EAClC,OAAmB,EACnB,MAAiC;;IAEjC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAC/B,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,OAAuB,CAAC;IAE/C,IAAI,OAAO,CAAC,mBAAmB;QAAE,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAEpF,MAAM,IAAI,GAAG,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAE3F,IAAI,OAAO,CAAC,gBAAgB;QAAE,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAE3E,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEvB,iDAAiD;IACjD,MAAM,KAAK,GAAG,MAAA,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,mCAAI,CAAC,CAAC;IAE/C,MAAM,IAAI,GAAqC;QAC7C,KAAK;QACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;KACrF,CAAC;IAEF,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,WAAW,CAAC,gBAAgB;YAC/B,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAE/B,MAAM;QACR,KAAK,WAAW,CAAC,cAAc;YAC7B,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;YAE7B,MAAM;QACR,QAAQ;QACR,aAAa;IACf,CAAC;AACH,CAAC;AAED,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Breakscape } from '../../../../breakscaping/Breakscape';
|
|
2
2
|
import { StringUtils } from '../../../../utils/StringUtils';
|
|
3
|
-
function referenceTagContentProcessor(_context, _contentDepth,
|
|
3
|
+
function referenceTagContentProcessor(_context, _contentDepth, _tagsConfig, content, target, isReferenceEnd) {
|
|
4
4
|
const { value } = content;
|
|
5
5
|
const trimmedStringValue = StringUtils.trimmedString(value);
|
|
6
6
|
if (isReferenceEnd) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"ReferenceTagContentProcessor.js","sourceRoot":"","sources":["../../../../../../src/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAU5D,SAAS,4BAA4B,CACnC,QAAiC,EACjC,aAA+B,EAC/B,WAAmC,EACnC,OAAmB,EACnB,MAAiC,EACjC,cAAuB;IAEvB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAoB,CAAC;IAEvC,MAAM,kBAAkB,GAAG,WAAW,CAAC,aAAa,CAAC,KAAK,CAAsB,CAAC;IAEjF,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACpE,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AACD,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
|
|
@@ -24,8 +24,9 @@ const resourceBuilder = new ResourceBuilder();
|
|
|
24
24
|
* @param resourceTypeAttachment the resource type specified in the bit header
|
|
25
25
|
* @param resources the resources on the bit
|
|
26
26
|
*/
|
|
27
|
-
function buildResources(context,
|
|
27
|
+
function buildResources(context, resourceTypeAttachment, resources) {
|
|
28
28
|
var _a, _b;
|
|
29
|
+
const { bitType } = context;
|
|
29
30
|
const filteredResources = [];
|
|
30
31
|
const excessResources = [];
|
|
31
32
|
const validatedResourceTypeAttachemnt = ResourceTag.fromValue(resourceTypeAttachment);
|
|
@@ -71,7 +72,7 @@ function buildResources(context, bitType, resourceTypeAttachment, resources) {
|
|
|
71
72
|
}
|
|
72
73
|
return filteredResources;
|
|
73
74
|
}
|
|
74
|
-
function resourceContentProcessor(context, _contentDepth,
|
|
75
|
+
function resourceContentProcessor(context, _contentDepth, tagsConfig, content, target) {
|
|
75
76
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
76
77
|
const { type: _ignoreType, key, value, chain } = content;
|
|
77
78
|
const resources = target.resources;
|
|
@@ -110,23 +111,23 @@ function resourceContentProcessor(context, _contentDepth, bitType, textFormat, t
|
|
|
110
111
|
// originalChain,
|
|
111
112
|
// );
|
|
112
113
|
// Process the chain
|
|
113
|
-
const _a = context.bitContentProcessor(BitContentLevel.Chain,
|
|
114
|
+
const _a = context.bitContentProcessor(BitContentLevel.Chain, resourceConfig === null || resourceConfig === void 0 ? void 0 : resourceConfig.chain, chain), { posterImage } = _a, tags = __rest(_a, ["posterImage"]);
|
|
114
115
|
// Handle the poster image
|
|
115
116
|
let posterImageResource;
|
|
116
117
|
if (posterImage) {
|
|
117
118
|
// Process the poster image chain
|
|
118
119
|
const { subConfig: posterImageChainConfig, subChain: posterImageChain } = extractSubChain(resourceConfig === null || resourceConfig === void 0 ? void 0 : resourceConfig.chain, chain, 'posterImage');
|
|
119
|
-
const _b = context.bitContentProcessor(BitContentLevel.Chain,
|
|
120
|
+
const _b = context.bitContentProcessor(BitContentLevel.Chain, posterImageChainConfig, posterImageChain), { posterImage: unused } = _b, posterImageTags = __rest(_b, ["posterImage"]);
|
|
120
121
|
unused;
|
|
121
122
|
// Build the poster image resource
|
|
122
|
-
posterImageResource = resourceBuilder.resource(
|
|
123
|
+
posterImageResource = resourceBuilder.resource(context, Object.assign({ type: ResourceTag.image, value: posterImage }, posterImageTags)).image;
|
|
123
124
|
}
|
|
124
|
-
const resource = resourceBuilder.resource(
|
|
125
|
+
const resource = resourceBuilder.resource(context, Object.assign({ type, value: Breakscape.unbreakscape(value), posterImage: posterImageResource }, tags));
|
|
125
126
|
if (resource)
|
|
126
127
|
resources.push(resource);
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
function propertyStyleResourceContentProcessor(context, _contentDepth,
|
|
130
|
+
function propertyStyleResourceContentProcessor(context, _contentDepth, tagsConfig, content, target, type) {
|
|
130
131
|
var _a;
|
|
131
132
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
132
133
|
const { type: _ignoreType, key, value, chain } = content;
|
|
@@ -134,14 +135,14 @@ function propertyStyleResourceContentProcessor(context, _contentDepth, bitType,
|
|
|
134
135
|
if (type) {
|
|
135
136
|
// Parse the resource chain
|
|
136
137
|
const resourceConfig = Config.getTagConfigForTag(tagsConfig, type);
|
|
137
|
-
const _b = context.bitContentProcessor(BitContentLevel.Chain,
|
|
138
|
+
const _b = context.bitContentProcessor(BitContentLevel.Chain, resourceConfig === null || resourceConfig === void 0 ? void 0 : resourceConfig.chain, chain), { posterImage } = _b, tags = __rest(_b, ["posterImage"]);
|
|
138
139
|
const posterImageResource = posterImage
|
|
139
|
-
? resourceBuilder.resource(
|
|
140
|
+
? resourceBuilder.resource(context, {
|
|
140
141
|
type: ResourceTag.image,
|
|
141
142
|
value: posterImage,
|
|
142
143
|
}).image
|
|
143
144
|
: undefined;
|
|
144
|
-
const resource = resourceBuilder.resource(
|
|
145
|
+
const resource = resourceBuilder.resource(context, Object.assign({ type, value: Breakscape.unbreakscape(value), posterImage: posterImageResource }, tags));
|
|
145
146
|
if (resource)
|
|
146
147
|
target.propertyStyleResources[key] = resource;
|
|
147
148
|
}
|