Spaces:
Sleeping
Sleeping
Ludek Matyska
commited on
Commit
·
7d9e03e
1
Parent(s):
044a142
fix: correct topic names
Browse files- theory_tools.py +3 -1
theory_tools.py
CHANGED
@@ -20,7 +20,9 @@ def _scrape_readme(rel_path: str) -> list[str]:
|
|
20 |
try:
|
21 |
md = requests.get(f"{RAW_ROOT}{rel_path}", timeout=10).text
|
22 |
# markdown link target: (...filename.ipynb)
|
23 |
-
|
|
|
|
|
24 |
except requests.RequestException:
|
25 |
return []
|
26 |
|
|
|
20 |
try:
|
21 |
md = requests.get(f"{RAW_ROOT}{rel_path}", timeout=10).text
|
22 |
# markdown link target: (...filename.ipynb)
|
23 |
+
found = re.findall(r"\(([^)]+?\.ipynb)\)", md)
|
24 |
+
# Clean up relative path prefixes like "./"
|
25 |
+
return [name.lstrip("./") for name in found]
|
26 |
except requests.RequestException:
|
27 |
return []
|
28 |
|