SVG sections are missing space between attributes sometimes. It results in invalid SVG syntax so other tools like eg. ImageMagick, Inkscape, or any online checker or converter complain about it.
Fix as a "works for me" solution:
index 5c5a2b6..7ef7ba3 100644
--- a/src/main/kotlin/com/cjsoftware/antlr4docgen/railroad/diagramitem/AbsDiagramItem.kt
+++ b/src/main/kotlin/com/cjsoftware/antlr4docgen/railroad/diagramitem/AbsDiagramItem.kt
@@ -71,7 +71,7 @@ internal abstract class AbsDiagramItem(val alignment: Alignment, val styleClass:
StringBuilder().apply {
append("<rect ")
append("x=${quotVal(x)} y=${quotVal(y)} ")
- append("width=${quotVal(w)} height=${quotVal(h)}")
+ append("width=${quotVal(w)} height=${quotVal(h)} ")
if (svgClass.isNotBlank()) append("class=${quotVal(svgClass)} ")
append("/>")
}.toString()
@@ -80,8 +80,8 @@ internal abstract class AbsDiagramItem(val alignment: Alignment, val styleClass:
StringBuilder().apply {
append("<rect ")
append("x=${quotVal(x)} y=${quotVal(y)} ")
- append("width=${quotVal(w)} height=${quotVal(h)}")
- append("rx=${quotVal((h / 2f) - 1f)}")
+ append("width=${quotVal(w)} height=${quotVal(h)} ")
+ append("rx=${quotVal((h / 2f) - 1f)} ")
if (svgClass.isNotBlank() == true) append("class=${quotVal(svgClass)} ")
append("/>")
}.toString()
SVG sections are missing space between attributes sometimes. It results in invalid SVG syntax so other tools like eg. ImageMagick, Inkscape, or any online checker or converter complain about it.
Fix as a "works for me" solution: