Skip to content

Commit

Permalink
escape * to prevent topics that contain it from not matching (#227)
Browse files Browse the repository at this point in the history
* escape * to prevent topics that contain it from not matching

* Made the string into an r-string
  • Loading branch information
Daenara authored Aug 2, 2022
1 parent 7de9b73 commit 0fdcd5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rhasspyhermes_app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def regex_mapper(part):
if token == "#"
else "[^/]+$"
if token == "+"
else token + "$"
else token.replace("*", r"\*") + "$" # not escaping * prevents the regex from matching
)

return value
Expand Down

0 comments on commit 0fdcd5e

Please sign in to comment.