diff --git a/web/olt/regions.py b/web/olt/regions.py index fdceb2c..e56dfef 100644 --- a/web/olt/regions.py +++ b/web/olt/regions.py @@ -200,6 +200,7 @@ def regions_index_page(records, site, infos=()): f'
  • {esc(i["name"])}' f'{_plural(len(i["records"]))}
  • ' for i in mine) + jump.append(f'
  • {esc(kind.hub_title)}{len(mine)}
  • ') blocks += f"""

    {esc(kind.hub_title)}

    @@ -218,7 +219,7 @@ def regions_index_page(records, site, infos=()):

    The {len(records)} trails by state and province, grouped into parts of the United States ({n_us}) and Canada ({n_ca}). A trail that crosses several states is on each one’s page.{lede_more}

    - +
    {blocks}
    {foot}""" description = (f"Where the {len(records)} long trails and routes are: {n_us} in the United States and {n_ca} in Canada, " f"by state and province, with the number in each.") diff --git a/web/tests/test_place_links.py b/web/tests/test_place_links.py index b28bd63..b8dbfc3 100644 --- a/web/tests/test_place_links.py +++ b/web/tests/test_place_links.py @@ -48,11 +48,25 @@ class HubTest(unittest.TestCase): self.assertIn("Parks, mountain ranges and wilderness areas with three or more " "trails have pages too.", re.sub(r"\s+", " ", body)) + def test_the_shortcut_strip_links_each_kind_that_has_pages(self): + _, _, body = regions.regions_index_page(self.records, S, infos=self.infos) + strip = str(body)[str(body).index('