| Message ID | 20250606-conf-syntax-warning-v1-1-4ebc90ae7d69@cherry.de |
|---|---|
| State | Accepted |
| Headers | show |
| Series | docs: conf.py: silence SyntaxWarning on js_splitter_code | expand |
On Fri, 06 Jun 2025 16:21:33 +0200, Quentin Schulz wrote: > The js_splitter_code string contains backslashes that Python tries to > use as escape sequence but doesn't manage to, hence the following > SyntaxWarning message: > > documentation/conf.py:188: SyntaxWarning: invalid escape sequence '\p' > .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}-]+/gu) > > [...] Applied, thanks! [1/1] docs: conf.py: silence SyntaxWarning on js_splitter_code commit: c1056672ef45b197136eb8815728d426337a5901 Best regards,
diff --git a/documentation/conf.py b/documentation/conf.py index ad60d911394561f16dc28b3d41329f08e6c0999b..1eca8756abac72d311b39144f65910d28b4e3aec 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -182,7 +182,7 @@ class DashFriendlySearchEnglish(SearchEnglish): # Accept words that can include hyphens _word_re = re.compile(r'[\w\-]+') - js_splitter_code = """ + js_splitter_code = r""" function splitQuery(query) { return query .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}-]+/gu)