Skip to content

Commit

Permalink
doc: fix to known issues py script
Browse files Browse the repository at this point in the history
Updating regex in the py file to match mjs.

Signed-off-by: Bartosz Gentkowski <[email protected]>
  • Loading branch information
b-gent authored and gmarull committed Jan 17, 2025
1 parent a68b6f3 commit 96f4077
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/_extensions/page_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,11 @@ def read_versions(app: Sphinx) -> None:
try:
with open(VERSIONS_FILE) as version_file:
nrf_versions = json.loads(version_file.read())
# Updated regex to match versions with optional segments
nrf_versions = list(
filter(lambda v: re.match(r"\d\.\d\.\d$", v), nrf_versions)
filter(lambda v: re.match(r"\d+\.\d+\.\d+(-.*)?$", v), nrf_versions)
)
# Versions classes are on the format "vX-X-X"
# Convert versions to a format suitable for class names
app.env.nrf_versions = [
f"v{version.replace('.', '-')}" for version in reversed(nrf_versions)
]
Expand Down

0 comments on commit 96f4077

Please sign in to comment.