Multiple empty string quotes in message of Sequence Diagram would disapear.

0 votes
asked Aug 8 in Bug by George Liou (240 points)

The error occurs when a message in sequence has multiple empty string quotes. For example:

@startuml Sequence-Message-Gone
skinparam defaultFontName Consolas
autonumber 0 10

participant AA
participant BA

AA -> BA: **API**("param1": "xxx", "para2": "",\n "para3": "", /*Notes*/\n "para4": "", "errMsg": "" )

@enduml

the lastest two string value of param para4 and errMsg was gone:

Sequence-Message-Gone

However, if the latest string quote is not empty, even if only a space, the quote shows correctly:

@startuml Sequence-Message-OK
skinparam defaultFontName Consolas
autonumber 0 10

participant AA
participant BA

AA -> BA: **API**("param1": "xxx", "para2": "",\n "para3": "", /*Notes*/\n "para4": "", "errMse": " " )

@enduml

Sequence-Message-OK

--

System information:

Plantuml version:

PlantUML version 1.2022.6 (Wed Jun 22 01:34:49 CST 2022)
(MIT source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: MS950
Language: zh
Country: TW

PLANTUML_LIMIT_SIZE: 4096

Dot version: dot - graphviz version 2.44.1 (20200629.0846)
Installation seems OK. File generation OK

commented Aug 8 by The-Lu (49,840 points)

Hello G., and all,

In fact that is due to monospaced creole command (""), see:

a->b: "" Monospaced ""
a->b: not Monospaced ""
a->b: ~"" Monospaced escaped ""

See Creole doc. on the plantUML website.

A possible workaround is to add Zero-width space <U+200B> before each ending double quote  or just after each first double quote, of each value, as:

AA -> BA: **API**("param1": "xxx<U+200B>", "para2": "<U+200B>",\n "para3": "<U+200B>", /*Notes*/\n "para4": "<U+200B>", "errMsg": "<U+200B>" )

If that can help,
Regards.

commented Aug 9 by George Liou (240 points)
edited Aug 9 by George Liou

Hello, The-Lu,

Thank you for your timely help. Now I get it. ^^;

The suggested workaround of "adding Zero-width space <U+200B> within string quote" works.

If monospaced creole command has this feature,
it's next to impossible to distinguish between monospaced style hint and two empty string quotes.

I think your comment is the best answer to this question.

Best regards,
George

1 Answer

0 votes
answered Aug 9 by The-Lu (49,840 points)

Hello G.,

I think your comment is the best answer to this question.

Then, to avoid an unanswered question, here is a minimal answer (I cannot change my comment to answer...):

A possible workaround is to add Zero-width space <U+200B> before each ending double quote  or just after each first double quote, of each value, as:

AA -> BA: **API**("param1": "xxx<U+200B>", "para2": "<U+200B>",\n "para3": "<U+200B>", /*Notes*/\n "para4": "<U+200B>", "errMsg": "<U+200B>" )

Regards.

...