Describe the bug
Actions spanning multiple lines in an activity diagram incorrectly detect an end at some special characters (especially a single closing curly brace } not followed by any other character), resulting in an error.
The bug can also be reproduced by running plantuml locally with the same form of diagram.
@startuml
start
:line with }c
Errors here;
end
@enduml
Expected behavior
A valid activity diagram is produced, that contains one action with a literal } character inside.
Only : and ; should delimit an action.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows 11
Browser: Firefox
Version: Current web version and git master
Additional context
I could narrow down the issue by debugging on the current master branch.
The behavior is caused by the Regex returned by CommandActivityLong3::getPatternEnd2(), which is used to determine when a long action is ended.
This regex matches the following strings at end of line (written as examples, the raw regex can be found in the source code in CommandActivity3.java):
; with optional <>
/ or < or } not preceded by /, |, <, } or ] (so matches lone }, but not /})
] not preceded by /, | or }
a single >, not part of a html tag with 5 or fewer letters, an img tag or a longer tag starting with & or $
I'm not familiar enough with the plantuml activity syntax to know why all these endings are required, but to me it seems like a multiline action should only end on a semicolon.
Describe the bug Actions spanning multiple lines in an activity diagram incorrectly detect an end at some special characters (especially a single closing curly brace } not followed by any other character), resulting in an error.
To Reproduce
Create an activity diagram containing an action where a line ends with a } symbol. An example running on the plantuml online service can be found here: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuG8pkBYiSZBpKXNACqioQhbSYuhoYueLCbABKgsvk5BpKhWSW0HGCG00
The bug can also be reproduced by running plantuml locally with the same form of diagram.
Expected behavior A valid activity diagram is produced, that contains one action with a literal } character inside. Only : and ; should delimit an action.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context I could narrow down the issue by debugging on the current master branch. The behavior is caused by the Regex returned by
CommandActivityLong3::getPatternEnd2()
, which is used to determine when a long action is ended.This regex matches the following strings at end of line (written as examples, the raw regex can be found in the source code in CommandActivity3.java):
I'm not familiar enough with the plantuml activity syntax to know why all these endings are required, but to me it seems like a multiline action should only end on a semicolon.