bitmark-standard / bitmark-grammar

7 stars 0 forks source link

[.match] Some \n and characters missing in the body #9

Open six5536 opened 1 year ago

six5536 commented 1 year ago

Describe the bug [.match] Second version with body before the ‘pairs’ results in some \n and characters to be missing in the body

To Reproduce Compare the parser JSON output for:

[.match:bitmark--]
[@id:301915]
[%B]
[!Match the words in bold in sentences 1–8 to the definitions a–h. Write the correct letters in the boxes.]
===
1. **Approximately** five minutes late.
==
e
===
2. Please **mind** where you walk. 
==
f
===
3. The flight is **boarding** at Gate 10. 
==
a
===
4. Please go to the front of the **carriage.** 
==
c
===
5. Some train services are **delayed.** 
==
h
===
6. The flight **departs** at 10.30. 
==
d
===
7. This train **terminates** here. 
==
g
===
8. There is a **gap** between the train and the platform.
==
b
===

a. ready for people to get on
b. space
c. section of a train
d. leaves
e. about, close to
f. be careful about
g. ends, finishes
h. late

And:

[.match]
[@id:301915]
[%B]
[!Match the words in bold in sentences 1–8 to the definitions a–h. Write the correct letters in the boxes.]

a. ready for people to get on
b. space
c. section of a train
d. leaves
e. about, close to
f. be careful about
g. ends, finishes
h. late

===
1. **Approximately** five minutes late.
==
e
===
2. Please **mind** where you walk. 
==
f
===
3. The flight is **boarding** at Gate 10. 
==
a
===
4. Please go to the front of the **carriage.** 
==
c
===
5. Some train services are **delayed.** 
==
h
===
6. The flight **departs** at 10.30. 
==
d
===
7. This train **terminates** here. 
==
g
===
8. There is a **gap** between the train and the platform.
==
b
===

Expected behavior I think the outputs should be the same. I am not sure if there is a rule that the body must be before / after the ===/== sections, but in any case, the behaviour of corrupting the 'body' is not correct.

versions 1.0.38