tmedwards / sugarcube-2

SugarCube is a free (gratis and libre) story format for Twine/Twee.
https://www.motoslave.net/sugarcube/2/
BSD 2-Clause "Simplified" License
177 stars 41 forks source link

<<do>> tags not processing comments properly. #300

Closed leahiel closed 4 months ago

leahiel commented 4 months ago

Version Publicly Available Alpha: SugarCube v2.37.0-alpha.19+10193 Most Recent Build Available: SugarCube v2.37.0-alpha.20+1 I did not test the backported <<do>> <<redo>> macro set for ≤ v2.36.1

Describe the bug. Text within <<do>> macros may not be parsing comments properly. For instance, having <<do>> within a comment will trigger an error if used within a <<do>> macro.

To Reproduce:

:: APassageName
/* <<do>> */
<<do>>
    No errors from comment outside of do macro!
<</do>>

<br><br>

<<do>>
    Oh look, errors!
    /* <<do>> */
<</do>>

image

Expected behavior. No error.

Project details.

Desktop details.

tmedwards commented 4 months ago

That is an undocumented "feature" of the v2 macro parser that isn't limited to the <<do>> macro and is not going to be fixed in the v2.x.x series.