Currently we seem to ignore the nobr tag on passages, and so we can produce incorrect errors on code which uses these.
It would be better if we process them closer to how sugarcube-2 process them.
There's two methods that we could use:
Copy the file's content and replace all the newlines. This has unfortunate performance issues for anything large.
Make various parts which parse content (macro collection, argument parsing, parameter validation) have a separate mode where they ignore newlines.
The second option is the preferred option, though it does complicate things and s potentially non-trivial to implement (but certainly feasible) and could have some mild performance negative on non-nobr use-cases.
The issue at the moment is that we aren't doing per-passage parsing, and this is per-passage.
We would also probably want to handle parsing the content of a nobr tag, since that has the same implications.
We would also want to provide a global option, since one can set nobr globally on a project.
Currently we seem to ignore the
nobr
tag on passages, and so we can produce incorrect errors on code which uses these.It would be better if we process them closer to how sugarcube-2 process them.
There's two methods that we could use:
The second option is the preferred option, though it does complicate things and s potentially non-trivial to implement (but certainly feasible) and could have some mild performance negative on non-nobr use-cases.
The issue at the moment is that we aren't doing per-passage parsing, and this is per-passage.
We would also probably want to handle parsing the content of a
nobr
tag, since that has the same implications.We would also want to provide a global option, since one can set nobr globally on a project.