From 34d63ac87930ab64cb0f7b9a956ee91ba29148f0 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 30 May 2025 01:59:15 +0100 Subject: [PATCH 1/3] sync-docs: fix syntax warning sync-docs.py:94: SyntaxWarning: invalid escape sequence '\d' m = re.match("v?(\d+).*", tag) --- tools/sync-docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sync-docs.py b/tools/sync-docs.py index 86fe1a8ed7..ab10413c3a 100755 --- a/tools/sync-docs.py +++ b/tools/sync-docs.py @@ -85,7 +85,7 @@ def get_latest_version(): tags = subprocess.check_output(["git", "tag", "-l", "v*"], text=True).split() versions = [] for tag in tags: - m = re.match("v?(\d+).*", tag) + m = re.match(r"v?(\d+).*", tag) if m: versions.append(int(m.group(1))) return max(versions) From 1cd995185bcd0ea3612ebaee2c311a5f36b2fa64 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 30 May 2025 02:02:01 +0100 Subject: [PATCH 2/3] sync-docs: fix selection menu when opening 'latest' man 'devel' will always sort first, so the highest version is the second entry, not the first one --- tools/sync-docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sync-docs.py b/tools/sync-docs.py index ab10413c3a..0a14108bfc 100755 --- a/tools/sync-docs.py +++ b/tools/sync-docs.py @@ -26,7 +26,7 @@ $(document).ready(function() { $.each( data, function(_, version) { if (version == dirname) { items.push( ""); - } else if (dirname == "latest" && version == data[0]) { + } else if (dirname == "latest" && version == data[1]) { items.push( ""); } else { items.push( ""); From 90b0222091e23ed21ecf7dacc9f885e72bcdfdc5 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 30 May 2025 02:03:08 +0100 Subject: [PATCH 3/3] sync-docs: add '(latest stable)' next to the latest version in the menu Add visual indicator of what is the latest version in the version menu --- tools/sync-docs.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/sync-docs.py b/tools/sync-docs.py index 0a14108bfc..ce10b1b444 100755 --- a/tools/sync-docs.py +++ b/tools/sync-docs.py @@ -24,12 +24,17 @@ $(document).ready(function() { var items = []; $.each( data, function(_, version) { - if (version == dirname) { - items.push( ""); - } else if (dirname == "latest" && version == data[1]) { - items.push( ""); + if (version == data[1]) { + latest = " (latest stable)"; } else { - items.push( ""); + latest = ""; + } + if (version == dirname) { + items.push( ""); + } else if (dirname == "latest" && version == data[1]) { + items.push( ""); + } else { + items.push( ""); } });