WebGAL icon indicating copy to clipboard operation
WebGAL copied to clipboard

Process line break: force-multiline & tests

Open tinyAdapter opened this issue 1 year ago • 0 comments

This PR enhances #558 with new features and tests.

In short, the preprocessor now does not consider any lines with -concat as a new line. This prevents the ambiguity of statements like

aaa 
|bbb -concat

being preprocessed as one line

aaa|bbb -concat
;_WEBGAL_LINE_BREAK_|bbb -concat

but breaks the original grammar of "show aaa at the first line, then show bbb at the second line when user clicks".


Now, the preprocessor will not handle this, only outputting

aaa 
|bbb -concat

The user can forcely enable multiline support in such case by adding \ to the end of the first line, i.e.,

aaa\
|bbb -concat

which will be preprocessed as

aaa|bbb -concat
;_WEBGAL_LINE_BREAK_|bbb -concat

tinyAdapter avatar Oct 19 '24 09:10 tinyAdapter