Compare commits

..

3 Commits

Author SHA1 Message Date
1059164b4a bugfix:
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m36s
Build Docker Image / Clean-Registry (push) Successful in 0s
markdown rendering glitched when several @startuml…@enduml sections were present in one document

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-22 20:46:43 +01:00
f438bea4cc Merge branch 'bugfix/plantuml'
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m25s
Build Docker Image / Clean-Registry (push) Successful in 0s
2026-01-20 23:14:46 +01:00
53fe79fbbd fixed image heights when scaling width
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-20 22:44:30 +01:00
4 changed files with 15 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ import org.json.JSONObject;
public class Util { public class Util {
public static final System.Logger LOG = System.getLogger("Util"); public static final System.Logger LOG = System.getLogger("Util");
private static final Pattern UML_PATTERN = Pattern.compile("@start(\\w+)(.*)@end(\\1)",Pattern.DOTALL); private static final Pattern UML_PATTERN = Pattern.compile("@start(\\w+)(.*?)@end(\\1)",Pattern.DOTALL);
private static File plantumlJar = null; private static File plantumlJar = null;
private static final JParsedown MARKDOWN = new JParsedown(); private static final JParsedown MARKDOWN = new JParsedown();
public static final String SHA1 = "SHA-1"; public static final String SHA1 = "SHA-1";
@@ -79,7 +79,7 @@ public class Util {
try { try {
if (plantumlJar != null && plantumlJar.exists()) { if (plantumlJar != null && plantumlJar.exists()) {
var matcher = UML_PATTERN.matcher(source); var matcher = UML_PATTERN.matcher(source);
if (matcher.find()) { while (matcher.find()) {
var uml = matcher.group(0).trim(); var uml = matcher.group(0).trim();
var start = matcher.start(0); var start = matcher.start(0);
var end = matcher.end(0); var end = matcher.end(0);
@@ -96,6 +96,7 @@ public class Util {
byte[] out = is.readAllBytes(); byte[] out = is.readAllBytes();
var svg = new String(out, UTF_8); var svg = new String(out, UTF_8);
source = source.substring(0, start) + svg + source.substring(end); source = source.substring(0, start) + svg + source.substring(end);
matcher = UML_PATTERN.matcher(source);
} }
} }
} }

View File

@@ -57,8 +57,9 @@ footer {
margin: 5px; margin: 5px;
} }
img { img, svg {
max-width: 100%; max-width: 100%;
height: auto !important;
} }
nav { nav {

View File

@@ -57,8 +57,9 @@ footer {
margin: 5px; margin: 5px;
} }
img { img, svg {
max-width: 100%; max-width: 100%;
height: auto !important;
} }
nav { nav {

View File

@@ -57,8 +57,9 @@ footer {
margin: 5px; margin: 5px;
} }
img { img, svg {
max-width: 100%; max-width: 100%;
height: auto !important;
} }
nav { nav {