1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-25 06:17:33 +00:00

fix: update graphviz version check pattern

Right now, the `graphviz` version detection failed to match with `10.x.x`, thus relaxing the version check regex.

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2024-02-11 19:43:14 +01:00
parent d65951f520
commit 097550284e
No known key found for this signature in database
GPG Key ID: 6577287BDCA70840
2 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ public class GraphvizUtils {
if (s == null) if (s == null)
return -1; return -1;
final Pattern p = Pattern.compile("\\s(\\d)\\.(\\d\\d?)\\D"); final Pattern p = Pattern.compile("\\s(\\d+)\\.(\\d\\d?)\\D");
final Matcher m = p.matcher(s); final Matcher m = p.matcher(s);
if (m.find() == false) if (m.find() == false)
return -1; return -1;

View File

@ -73,7 +73,7 @@ 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("(\\d+)\\.(\\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)