diff --git a/docs/i18n/ar/quickstart.md b/docs/i18n/ar/quickstart.md index d28d5fc700..224686de36 100644 --- a/docs/i18n/ar/quickstart.md +++ b/docs/i18n/ar/quickstart.md @@ -72,7 +72,7 @@ python -I make_game.py --game "D:\path\to\package" --out "D:\Games\Leonida" --wo يعمل `make_game.py` على Linux، ويجد `llvm-mc` تلقائيًا إذا كان ضمن `PATH`. تأكد من أن نسخته تدعم AMDGPU. يعمل محمّل اللعبة، وهو برنامج Windows، عبر Wine أو Proton. إذا كان لديك بناء Windows جاهز للمحمّل، -فمرّر مجلده باستخدام `--runtime-build`. راجع [تعليمات البناء والتشغيل على Linux](../../../README.md#running-the-loader-on-linux). +فمرّر مجلده باستخدام `--runtime-build`. راجع [تعليمات البناء والتشغيل على Linux](../../linux.md). ## حل المشاكل الشائعة diff --git a/scripts/windows-boot/test_crash_monitor.py b/scripts/windows-boot/test_crash_monitor.py index 140a870abe..fffda8e30b 100644 --- a/scripts/windows-boot/test_crash_monitor.py +++ b/scripts/windows-boot/test_crash_monitor.py @@ -34,7 +34,7 @@ def check_artifacts(self, code, exception): streams = dict((kind, pos) for kind, size, pos in (struct.unpack_from(" or ), kept when a heading is renamed so old links still land. +HTML_ANCHOR = re.compile(r"]*\b(?:id|name)\s*=\s*[\"']([^\"']+)[\"']", re.I) EXTERNAL = ("http://", "https://", "mailto:", "tel:", "data:") @@ -103,6 +105,7 @@ def anchors(path): count = seen.get(base, 0) seen[base] = count + 1 found.add(base if count == 0 else f"{base}-{count}") + found.update(HTML_ANCHOR.findall(text)) return found @@ -249,6 +252,13 @@ def test_heading_after_inline_backticks_is_an_anchor(self): f.write("Use ```code``` inline.\n\n## Real heading\n\n```\n## Not a heading\n```\n") self.assertEqual(anchors(page), {"real-heading"}) + def test_explicit_html_anchor_is_an_anchor(self): + with tempfile.TemporaryDirectory() as tmp: + page = os.path.join(tmp, "page.md") + with open(page, "w", encoding="utf-8") as f: + f.write('\n\n## Where it stands\n\n\n') + self.assertEqual(anchors(page), {"project-status", "where-it-stands", "old-name"}) + class RepositoryLinksTest(unittest.TestCase): def test_checks_referenced_definitions_but_not_unused_ones(self):