bitmark-standard / bitmark-grammar

7 stars 0 forks source link

[.article] body modified with placeholder if it contains [...] #12

Open six5536 opened 1 year ago

six5536 commented 1 year ago

Describe the bug [.article] body modified with placeholder if it contains [...]. Maybe this is invalid bitmark as it contains unescaped [.], but in any case the behaviour should be checked.

To Reproduce Parse the following bitmark to produce JSON output:

[.article:bitmark--]
[@id:225557]
These exercises gave the bodies of the Greeks the strong and manly contours which the masters then imparted to their statues without any exaggeration or excess. [...]

The following JSON is produced:

 {
   "bitmark": "[.article:bitmark--]\n[@id:225557]\nThese exercises gave the bodies of the Greeks the strong and manly contours which the masters then imparted to their statues without any exaggeration or excess. [...]",
   "bit": {
     "type": "article",
     "format": "bitmark--",
     "body": "These exercises gave the bodies of the Greeks the strong and manly contours which the masters then imparted to their statues without any exaggeration or excess. ${{0}}[...]",
     "id": [
       "225557"
     ]
   }
 }

Expected behavior The parser might want to report this as an error, as the [...] looks like a new bit called '..' but instead it behaves as shown above.

versions 1.0.38