From d63ef4b1cfac2efa511ea5ea6e1927df5dc64b77 Mon Sep 17 00:00:00 2001
From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com>
Date: Thu, 5 Nov 2026 19:34:41 +0100
Subject: [PATCH] fix: keep an initial inside the note sentence
The emulator description taken from the notes cut at the first period followed by a space, so hcl's read "open-source port of E.".
---
scripts/generate_site.py | 4 +++-
tests/test_site_search.py | 10 ++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/scripts/generate_site.py b/scripts/generate_site.py
index d48f812de..e9d0dec0e 100644
--- a/scripts/generate_site.py
+++ b/scripts/generate_site.py
@@ -2547,7 +2547,9 @@ def _emulator_description(markdown: str, key: str, title: str, intro: str) -> st
its profile table when the profile names no system."""
notes = re.search(r"Technical notes\s*\n\n(.+?)(?:\n\n|$)", markdown, re.S)
if not intro and notes:
- sentence = re.split(r"(?<=\.)\s", _plain_markdown(notes[1]), maxsplit=1)[0]
+ # An initial is no sentence end: hcl's read "open-source port of E."
+ sentence = re.split(r"(? None:
+ """hcl's description was "Hydra Castle Labyrinth: open-source port of E."."""
+ body = ("# Hydra Castle Labyrinth\n\n\nTechnical notes
\n\n"
+ "Open-source port of E. Hashimoto's 2008 freeware Metroidvania. It reads "
+ "its data folder.\n\n \n")
+ text = gs._emulator_description(body, "emulators/hcl.md", "Hydra Castle Labyrinth", "")
+ self.assertTrue(text.startswith("Hydra Castle Labyrinth: open-source port of E. "
+ "Hashimoto's 2008 freeware Metroidvania."), text)
+ self.assertNotIn("It reads", text)
+
def test_a_platform_page_says_what_it_gives(self) -> None:
"""All 18 ended on the label of a link a snippet cannot follow,
"ROCKNIX website.", and never named the BIOS files or their folder."""