Skip to content

Commit

Permalink
html2text: fix syntax error for python 3.12
Browse files Browse the repository at this point in the history
See https://docs.python.org/3/whatsnew/3.12.html
"A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning"
This was getting elevated to an error inside readme2modulestrings.py,
causing failure to generate module_strings.h
  • Loading branch information
reticulatedpines committed Feb 23, 2024
1 parent b6fb584 commit 09d3fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/html2text.py
Expand Up @@ -627,7 +627,7 @@ def o(self, data, puredata=0, force=0):
self.drop_white_space = 0

if puredata and not self.pre:
data = re.sub('\s+', ' ', data)
data = re.sub('\\s+', ' ', data)
if data and data[0] == ' ':
self.space = 1
data = data[1:]
Expand Down

0 comments on commit 09d3fdd

Please sign in to comment.