summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@cherry.de>2025-06-06 16:21:33 +0200
committerSteve Sakoman <steve@sakoman.com>2025-06-13 08:42:36 -0700
commit58c95e1d4c44d54eee44a3503371b4f672790897 (patch)
tree9391511b5aa8f9cf3e8d5819f2c59808fe8e0986 /documentation
parent0d1428e5b810f6c69f8cbdb7c27485afa091eb32 (diff)
downloadpoky-58c95e1d4c44d54eee44a3503371b4f672790897.tar.gz
docs: conf.py: silence SyntaxWarning on js_splitter_code
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) Considering that we want this to be sent verbatim to the JS, let's make this a raw string instead. Fixes: d4a98ee19e0c ("conf.py: tweak SearchEnglish to be hyphen-friendly") (From yocto-docs rev: 92bc958301d0aeab0a19e75b8604f01770358195) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit c1056672ef45b197136eb8815728d426337a5901) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/conf.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/documentation/conf.py b/documentation/conf.py
index efd1a1618f..33c6fa027f 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -174,7 +174,7 @@ class DashFriendlySearchEnglish(SearchEnglish):
174 # Accept words that can include hyphens 174 # Accept words that can include hyphens
175 _word_re = re.compile(r'[\w\-]+') 175 _word_re = re.compile(r'[\w\-]+')
176 176
177 js_splitter_code = """ 177 js_splitter_code = r"""
178function splitQuery(query) { 178function splitQuery(query) {
179 return query 179 return query
180 .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}-]+/gu) 180 .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}-]+/gu)