From be5564f5b23065c67d4105fd49523acd7e2f98c3 Mon Sep 17 00:00:00 2001 From: Beat Christen Date: Mon, 13 Jul 2020 15:46:55 +0200 Subject: [PATCH] ignore trailing ws when reading diagrams from pipes fixes #349 --- src/net/sourceforge/plantuml/Pipe.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/Pipe.java b/src/net/sourceforge/plantuml/Pipe.java index 4f868072b..2034e4c01 100644 --- a/src/net/sourceforge/plantuml/Pipe.java +++ b/src/net/sourceforge/plantuml/Pipe.java @@ -163,10 +163,10 @@ public class Pipe { break; } } - if (sb.length() == 0) { + String source = sb.toString().trim(); + if (source.length() == 0) { return null; } - String source = sb.toString(); if (source.startsWith("@start") == false) { source = "@startuml\n" + source + "\n@enduml"; }