Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade C4 PlantUML definition files to 2.7.0 #1605

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions server/src/main/java/io/kroki/server/service/Plantuml.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public class Plantuml implements DiagramService {
private static final String c4Deployment = c4Container + read("c4_deployment.puml");
// dynamic includes component
private static final String c4Dynamic = c4Component + read("c4_dynamic.puml");
// sequence includes component
private static final String c4Sequence = c4Component + read("c4_sequence.puml");
private final SourceDecoder sourceDecoder;
private final List<Pattern> includeWhitelist;
private static final List<String> STDLIB = Arrays.asList(
Expand Down Expand Up @@ -292,6 +294,8 @@ private static void ignoreInclude(String line, StringBuilder sb, SafeMode safeMo
sb.append(c4Deployment).append("\n");
} else if (include.toLowerCase().contains("c4_dynamic.puml")) {
sb.append(c4Dynamic).append("\n");
} else if (include.toLowerCase().contains("c4_sequence.puml")) {
sb.append(c4Sequence).append("\n");
} else if (safeMode.value < SafeMode.SECURE.value) {
if (!include.startsWith("<") // includes starting with < must only come from stdlib
&& !include.startsWith("/") && !include.startsWith("\\") // no absolute paths,
Expand Down
Loading