Fix the version and end of line issue

This commit is contained in:
Maxime Sinclair 2011-02-17 10:30:21 +01:00
parent 85169a1baf
commit dac7c9f945
1 changed files with 5 additions and 2 deletions

View File

@ -148,7 +148,10 @@ public class PlantUmlServlet extends HttpServlet {
StringBuilder plantUmlSource = new StringBuilder();
plantUmlSource.append("@startuml\n");
plantUmlSource.append(text);
plantUmlSource.append("\n@enduml");
if (text.endsWith("\n") == false) {
plantUmlSource.append("\n");
}
plantUmlSource.append("@enduml");
final String uml = plantUmlSource.toString();
SourceStringReader reader = new SourceStringReader(uml);
// Write the first image to "os"
@ -188,4 +191,4 @@ public class PlantUmlServlet extends HttpServlet {
}
}
}
}