diff --git a/gv-core/jvm/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/Exec.scala b/gv-core/jvm/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/Exec.scala index 31c259e..0677ad9 100644 --- a/gv-core/jvm/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/Exec.scala +++ b/gv-core/jvm/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/Exec.scala @@ -116,7 +116,7 @@ trait GraphHandlers { var value: Graph = null def handle(out: InputStream) { - value = dsl.parseAsGraph(Source.fromInputStream(out).mkString) + value = dsl.parseAsGraph(Source.fromInputStream(out).mkString.trim()) out.close() } } diff --git a/gv-core/shared/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/DotLayout.scala b/gv-core/shared/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/DotLayout.scala index 7dfff61..d52ba52 100644 --- a/gv-core/shared/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/DotLayout.scala +++ b/gv-core/shared/src/main/scala/uk/co/turingatemyhamster/graphvizs/exec/DotLayout.scala @@ -14,8 +14,9 @@ object DotLayout { val circo = DotLayout("circo") val fdp = DotLayout("fdp") val sfdp = DotLayout("sfdp") + val patchwork = DotLayout("patchwork") val allLayouts = Seq( - dot, neato, twopi, circo, fdp, sfdp + dot, neato, twopi, circo, fdp, sfdp, patchwork ) }