SVG Metadata: Space between hyphens

0 votes
asked May 8 in Bug by coxley

When extracting the metadata from an SVG diagram, there are spaces in between the hyphens. Rendering the result fails, making metadata not identical.

Example: http://www.plantuml.com/plantuml/uml/~1UDfrpp4EmZ0CGD7Tf_058i70WaZLTcFj3PnYgPPIfoJEmkaHZLXGsP_qzQ4lHjdg6W6ynxkA2KLvaKbIz1w0gYMjQ-0CGvIPqNKufd35eTh2QZ8tE_6pSZ4OKq3dEjpnWIfRqi9xRUADJGvAU3xXvJUdoHREICVPXc_EDKt_z3VVipu-rs-GkLSn

Output:

<SVG data>

<!--MD5=[99c473cf1763466ab516dfa997550731]
@startuml

== Initialization ==

autonumber
Alice -> Bob: Authentication Request
Bob - -> Alice: Authentication Response

== Repetition ==

autonumber 10 5
Alice -> Bob: Another authentication Request
Alice <- - Bob: another authentication Response

@enduml

PlantUML version 1.2020.04(Thu Mar 19 03:16:49 PDT 2020)
(LGPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.8.0_192-b12
Operating System: Linux
Default Encoding: ANSI_X3.4-1968
Language: en
Country: US
--></g></svg>

# Another example
<SVG data>
<!--MD5=[760593ba2421c8e6ab1b59798a2624c8]
@startuml
Alice -> Bob : hello - -there- -
... Some ~~long delay~~ ...
Bob -> Alice : ok
note left
  This is **bold**
  This is //italics//
  This is ""monospaced""
  This is - -stroked- -
  This is __underlined__
  This is ~~waved~~
end note
@enduml
PlantUML version 1.2020.04(Thu Mar 19 03:16:49 PDT 2020)
(LGPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.8.0_192-b12
Operating System: Linux
Default Encoding: ANSI_X3.4-1968
Language: en
Country: US
--></g></svg>%                                                                                                                                                                                                         

1 Answer

0 votes
answered May 11 by The-Lu (2,580 points)

Hello Coxley,

You can see this first answer (of @plantuml) on another report about this fact:

"The main issue is that the diagram code is put into a svg comment. Separator for SVG comment are <!-- and --> so spaces are added to prevent clash between the diagram definition itself and the SVG comment separators.

We cannot do much about this. Any suggestion is welcome !"

From:

Depending of the current implementation of putting plantuml image source code in comment tag on the svg:

If that can help,
Regard,
Th.

...