mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
This commit is contained in:
@@ -42,7 +42,7 @@ class VersionAlertMixin:
|
||||
current_version_kwargs.update(
|
||||
{
|
||||
"content_path": re.sub(
|
||||
r"([_0-9]+)/(\S+)",
|
||||
r"([_0-9]+|master|develop)/(\S+)",
|
||||
rf"{LATEST_RELEASE_URL_PATH_STR}/\2",
|
||||
current_version_kwargs.get("content_path"),
|
||||
)
|
||||
|
||||
@@ -326,5 +326,8 @@ def docs_path_to_boost_name(content_path):
|
||||
Convert a documentation content path to the Boost version name.
|
||||
e.g. "1_79_0/doc/html/accumulators.html" to "boost-1.79.0"
|
||||
"""
|
||||
result = re.sub(r"^([_0-9]+)(/\S+)", r"boost-\1", content_path)
|
||||
if content_path.startswith("develop") or content_path.startswith("master"):
|
||||
result = content_path.split("/")[0]
|
||||
else:
|
||||
result = re.sub(r"^([_0-9]+)(/\S+)", r"boost-\1", content_path)
|
||||
return result.replace("_", ".")
|
||||
|
||||
Reference in New Issue
Block a user