Fixed error in regex that detects noindex directives, and bumped Python to 3.12 in CI/CD workflow when running unit tests #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixed a bug in the regular expression used to detect if a page has a meta robots noindex directive in the head. Bug related to
\s*
for detecting a sequence of 0 or more spaces possibly not being correctly passed to Python's regex processor. Python 3.12 gives a warning of an invalid escape sequence. Need to escape the slash so it is passed to regex processor, and not treated as an escape in the string. Curiously, earlier versions of Python don't warn about this. I haven't been able to create an example that demonstrates the bug, which suggests that a\s
is being passed through to the regex processor as desired. But should fix this anyway, as future versions of Python may treat the invalid escape sequence differently.Bump Python to 3.12 in CI/CD workflow when running unit tests, in preparation for bumping Python to 3.12 within the Docker container for the action.
Closing Issues
Closes #107
Closes #110
Types of changes