mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-21 00:57:50 -06:00
fix: space Starlight's previous and next links
The word and the page title were split by a <br> only, which a copy, textContent and an assistant read as "PreviousWhat the packs do not hold". The override keeps Starlight's look, spaces them, names each link by direction and page, and makes the pair a navigation landmark.
This commit is contained in:
1 parent
baa42df2a7
commit
8d69ad54df
4 files changed
+125
-4
No files matched your search
@@ -396,7 +396,7 @@ class _Page(HTMLParser):
|
||||
def handle_endtag(self, tag: str) -> None:
|
||||
if tag == "nav" and self._crumbs:
|
||||
self._crumbs = 0
|
||||
if tag == "div" and self._pagination and not self.pagination:
|
||||
if tag == "nav" and self._pagination and not self.pagination:
|
||||
self._pagination = False
|
||||
if self._text is not None and tag in ("a", "summary"):
|
||||
self.sidebar.append(" ".join("".join(self._text).split()))
|
||||
@@ -621,7 +621,7 @@ def _html(url: str) -> str:
|
||||
|
||||
|
||||
def _pagination(text: str) -> tuple[str | None, str | None]:
|
||||
start = text.find('<div class="pagination-links')
|
||||
start = text.find('<nav class="pagination-links')
|
||||
if start == -1:
|
||||
return None, None
|
||||
links = text[start:text.find("</footer>", start)]
|
||||
|
||||
Reference in new issue
Block a user