newline with \n no longer works in some parts of state diagram

0 votes
asked May 11, 2017 in Bug by anonymous
I've just upgraded to PlantUML version 1.2017.12 from version 8041 and now \n does not work sometimes. In the (cut-down) example below, the Rule defined in the statechart just shows \n literally, but the OnEntry text in the initialState renders \n correctly as a newline. If I move the Rule text down into the InitialState and change the reference then the \n is rendered correctly.

skinparam state {
    backgroundColor White
 backgroundColor<<softwaremodule>> #CCDBC8
 backgroundColor<<signal>> #DE8C73
 backgroundColor<<statechart>> LightYellow
 backgroundColor<<statemachine>> LightYellow
 backgroundColor<<state>> LightYellow
 backgroundColor<<initialstate>> LightYellow
    BorderColor<<initialstate>> Black
skinparam shadowing false
skinparam defaultTextAlignment left
state "**&#171;statechart&#187; Master Switchgear Model - Logic**" as 8E437FA1B6DC905 <<statechart>> {
  8E437FA1B6DC905 : **Rule:**\n    if ('openStatus') then\n        'switchgearStatus' := $OPEN$
  state "**&#171;statemachine&#187; smSwOp**" as 6D4FA3B201978C <<statemachine>> {
    [*] -[#blue,bold]-> 368F54ED2A907
    state "**&#171;initialstate&#187; stInit**" as 368F54ED2A907 <<initialstate>> {
      368F54ED2A907 : **OnEntry:**\n    'operatingMode' := $Switchgear Model Initialisation$\n    'setOperatingModeInfo' := $Set 1 for Auto Mode, Set 2 for RTDS Mode, Set 3 for Manual Mode$\n

1 Answer

0 votes
answered May 11, 2017 by plantuml (158,940 points)
Thanks for the report!
This is indeed a regression: sorry about that.

You'll find here the last beta that fixes this issue:

Hope this help!

Thanks again