diff --git a/tools/sync-docs.py b/tools/sync-docs.py index 86fe1a8ed7..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[0]) { - 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( ""); } }); @@ -85,7 +90,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)