Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when using -pipe to generate an svg, trailing whitespace is interpreted as another diagram #349

Closed
beatchristen opened this issue Jul 13, 2020 · 1 comment · Fixed by #350

Comments

@beatchristen
Copy link
Contributor

Given a puml file with trailing whitespace after @enduml, and using the -pipe to process an SVG file, the first generated diagram is succeeded by an empty svg diagram, which makes the SVG invalid XML:

@startuml
Bob->Alice : hello
@enduml


^ two empty lines after @enduml

/usr/bin/java -jar target/plantuml-1.2020.15-SNAPSHOT.jar -nometadata -tsvg -pipe -pipenostderr < trailing-whitespace.puml | xmllint --format -
Some diagram description contains errors
-:1: parser error : Extra content at the end of the document
ust="spacingAndGlyphs" textLength="31" x="37" y="65.0566">hello</text></g></svg>
                                                                               ^

Expectation whas, that those two empty lines after @enduml would just be ignored.

@beatchristen
Copy link
Contributor Author

The test file for reference
trailing-whitespace.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant