diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e378b2c..b69876fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Run Python unit tests run: python3 -u -m unittest tests/tests.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 05724ef6..f774821e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] - 2023-09-22 +## [Unreleased] - 2023-10-05 ### Added @@ -15,8 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### Fixed +* Fix minor bug in regex used to detect if a page has a meta robots noindex directive in head. ### CI/CD +* Bump Python to 3.12 in CI/CD workflows when running unit tests. ### Dependencies * Bump cicirello/pyaction from 4.14.1 to 4.24.0 diff --git a/generatesitemap.py b/generatesitemap.py index 2b75e3df..af0e59cb 100755 --- a/generatesitemap.py +++ b/generatesitemap.py @@ -103,7 +103,7 @@ def hasMetaRobotsNoindex(f) : m = re.search("", contents, flags=re.I) all_meta_tags = RE_META_TAG.findall(contents, endpos=m.start()) if m else RE_META_TAG.findall(contents) for tag in all_meta_tags : - if re.search("name\s*=\s*\"\s*robots", tag, flags=re.I) and re.search("content\s*=\s*\".*noindex", tag, flags=re.I) : + if re.search("name\\s*=\\s*\"\\s*robots", tag, flags=re.I) and re.search("content\\s*=\\s*\".*noindex", tag, flags=re.I) : return True return False except OSError: