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:
parent
87d472f122
commit
c0332c621d
@ -72,14 +72,15 @@ public class GraphvizVersionFinder {
|
|||||||
|
|
||||||
public GraphvizVersion getVersion() {
|
public GraphvizVersion getVersion() {
|
||||||
final String dotVersion = dotVersion();
|
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 Matcher m = p.matcher(dotVersion);
|
||||||
final boolean find = m.find();
|
final boolean find = m.find();
|
||||||
if (find == false) {
|
if (find == false) {
|
||||||
return DEFAULT;
|
return DEFAULT;
|
||||||
}
|
}
|
||||||
final String vv = m.group(0);
|
final int major = Integer.parseInt(m.group(1));
|
||||||
final int v = Integer.parseInt(vv.replaceAll("\\.", ""));
|
final int minor = Integer.parseInt(m.group(2));
|
||||||
|
final int v = 100 * major + minor;
|
||||||
return new GraphvizVersion() {
|
return new GraphvizVersion() {
|
||||||
public boolean useShield() {
|
public boolean useShield() {
|
||||||
return v <= 228;
|
return v <= 228;
|
||||||
|
Loading…
Reference in New Issue
Block a user