diff --git a/CHANGELOG.md b/CHANGELOG.md index 67b37e2..c32ae5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ We are currently working on porting this changelog to the specifications in This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Version 1.1.5 - Unreleased +## Version 1.1.6 - Unreleased + +### Fixed +* Fixed passing of `flags` as keyword argument to `re.sub` for python 3.13 compliance. + + +## Version 1.1.5 - Released 2024-06-08 ### Changed * Minor modification to `xdoctest --version-info` and exposed it in CLI help. diff --git a/src/xdoctest/checker.py b/src/xdoctest/checker.py index 2ad1747..e1032e6 100644 --- a/src/xdoctest/checker.py +++ b/src/xdoctest/checker.py @@ -634,7 +634,7 @@ def remove_blankline_marker(text): '\n{marker}', '{marker}']).format( marker=BLANKLINE_MARKER, pos_lb=pos_lb) # blankline_pattern = r'(?<=\n)[ ]*{}\n?'.format(re.escape(BLANKLINE_MARKER)) - new_text = re.sub(blankline_pattern, '\n', text, re.MULTILINE) + new_text = re.sub(blankline_pattern, '\n', text, flags=re.MULTILINE) return new_text