hallvard / plantuml

Embed UML diagrams in files and view them in Eclipse
http://plantuml.sourceforge.net/
209 stars 57 forks source link

Empty commented line in inline comments leads to error #129

Open jkraskesis opened 3 years ago

jkraskesis commented 3 years ago

Inserting an empty commented line in inline comments leads to error: /**

It would be nice if this was permitted as many editors automatically insert a '*' when adding an extra line in a comment and "blank" lines are helpfull in structuring large inline plantuml cpmments

hallvard commented 3 years ago

The YAML support in PlantUML, forced med to handle whitespace differently, since YAML is whitespace-sensitive. Here I take the prefix before @startuml and remove it from the other lines if it's there. In this case the prefix is " ", so a line with only " " will not end up as the empty line, at least this is the intention. If the line really consists of " " and not " ", my implementation must be faulty. I could also add logic for detecting the case where a trimmed prefix equals a trimmed line and remove that line.