Skip to content

[.match-solution-grouped] body is incorrectly filled with the section dividers === / == #8

@six5536

Description

@six5536

Describe the bug
[.match-solution-grouped] body is incorrectly filled with the section dividers

To Reproduce
Parse the following bitmark to produce JSON output:

[.match-solution-grouped:bitmark--]
[@id:245334]
[%1][%HK E.1 Infektionslehre]
[!Ordnen Sie die deutschen Begriffe den Fachbegriffen zu.]
===
Überwärmung
==
Calor
===
Rötung
==
Rubor
===
Schmerzen
==
Dolor
===
eingeschränkte Funktion
==
Functio laesa
===
Schwellung
==
Tumor
===

The following JSON is produced:

 {
   "bitmark": "[.match-solution-grouped:bitmark--]\n[@id:245334]\n[%1][%HK E.1 Infektionslehre]\n[!Ordnen Sie die deutschen Begriffe den Fachbegriffen zu.]\n===\nÜberwärmung\n==\nCalor\n===\nRötung\n==\nRubor\n===\nSchmerzen\n==\nDolor\n===\neingeschränkte Funktion\n==\nFunctio laesa\n===\nSchwellung\n==\nTumor\n===",
   "bit": {
     "type": "match-solution-grouped",
     "format": "bitmark--",
     "item": "1",
     "heading": {},
     "pairs": [
       {
         "key": "Überwärmung",
         "values": [
           "Calor"
         ],
         "item": "",
         "hint": "",
         "instruction": "",
         "isCaseSensitive": true,
         "isExample": false,
         "example": "",
         "isLongAnswer": false
       },
       {
         "key": "Rötung",
         "values": [
           "Rubor"
         ],
         "item": "",
         "hint": "",
         "instruction": "",
         "isCaseSensitive": true,
         "isExample": false,
         "example": "",
         "isLongAnswer": false
       },
       {
         "key": "Schmerzen",
         "values": [
           "Dolor"
         ],
         "item": "",
         "hint": "",
         "instruction": "",
         "isCaseSensitive": true,
         "isExample": false,
         "example": "",
         "isLongAnswer": false
       },
       {
         "key": "eingeschränkte Funktion",
         "values": [
           "Functio laesa"
         ],
         "item": "",
         "hint": "",
         "instruction": "",
         "isCaseSensitive": true,
         "isExample": false,
         "example": "",
         "isLongAnswer": false
       },
       {
         "key": "Schwellung",
         "values": [
           "Tumor"
         ],
         "item": "",
         "hint": "",
         "instruction": "",
         "isCaseSensitive": true,
         "isExample": false,
         "example": "",
         "isLongAnswer": false
       }
     ],
     "body": "===\n\n==\n===\n\n==\n===\n\n==\n===\n\n==\n===\n\n==\n===",
     "id": [
       "245334"
     ],
     "lead": "HK E.1 Infektionslehre",
     "instruction": "Ordnen Sie die deutschen Begriffe den Fachbegriffen zu."
   }
 }

Expected behavior
I think the body should be empty in this case, or populated with a body if there is one.

versions
1.0.38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions