Closed gulumige closed 3 years ago
That is an unavoidable consequence of how all three of the no-break features work. Anything that depends upon newlines will be affected.
This is, unfortunately, not something that can be addressed in SugarCube v2.
Both the
nobr
passage tag and the<<nobr>>
macro removes all line breaks from the content of the<<script>>
macro. This can result in valid JS throwing errors as well as invalid JS not throwing errors.Example of valid JS throwing an error:
Removing the
nobr
tag or adding a semicolon after"Hello, World!"
both fixes the issue in this case. (The same would apply if the<<script>>
macro was wrapped in a<<nobr>>
macro.)Example of invalid JS not throwing an error:
Removing the
nobr
tag throws an appropriate error.