1
0
mirror of https://github.com/octoleo/plantuml.git synced 2025-01-02 22:50:20 +00:00

Support for Graphviz 3.0

This commit is contained in:
PlantUML 2022-03-01 09:31:02 +01:00 committed by GitHub
parent 87d472f122
commit c0332c621d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,14 +72,15 @@ public class GraphvizVersionFinder {
public GraphvizVersion getVersion() {
final String dotVersion = dotVersion();
final Pattern p = Pattern.compile("\\d\\.\\d\\d");
final Pattern p = Pattern.compile("([23])\\.(\\d\\d?)");
final Matcher m = p.matcher(dotVersion);
final boolean find = m.find();
if (find == false) {
return DEFAULT;
}
final String vv = m.group(0);
final int v = Integer.parseInt(vv.replaceAll("\\.", ""));
final int major = Integer.parseInt(m.group(1));
final int minor = Integer.parseInt(m.group(2));
final int v = 100 * major + minor;
return new GraphvizVersion() {
public boolean useShield() {
return v <= 228;