From 097550284e494da4e8c267d06214f8b66a229647 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sun, 11 Feb 2024 19:43:14 +0100 Subject: [PATCH] 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 --- src/net/sourceforge/plantuml/dot/GraphvizUtils.java | 2 +- src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/dot/GraphvizUtils.java b/src/net/sourceforge/plantuml/dot/GraphvizUtils.java index 803023cbc..23261f328 100644 --- a/src/net/sourceforge/plantuml/dot/GraphvizUtils.java +++ b/src/net/sourceforge/plantuml/dot/GraphvizUtils.java @@ -197,7 +197,7 @@ public class GraphvizUtils { if (s == null) 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); if (m.find() == false) return -1; diff --git a/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java b/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java index 8a58e7b25..706bb5f0a 100644 --- a/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java +++ b/src/net/sourceforge/plantuml/dot/GraphvizVersionFinder.java @@ -73,7 +73,7 @@ public class GraphvizVersionFinder { public GraphvizVersion getVersion() { 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 boolean find = m.find(); if (find == false)