YAML coverage parser bug fixed -- handling \n and \t correctly

This commit is contained in:
Aaron Traas 2017-07-13 15:56:37 -04:00 committed by Eric S. Raymond
parent 2ec9c7cc1a
commit 99595f6a2a
3 changed files with 3 additions and 6 deletions

View file

@ -44,6 +44,8 @@ def search(needle, haystack):
# replacing %s, %d, etc. with regex wildcards, so the variable messages
# within the dungeon definition will actually match
needle = re.escape(needle) \
.replace("\\n", "\n") \
.replace("\\t", "\t") \
.replace("\%S", ".*") \
.replace("\%s", ".*") \
.replace("\%d", ".*") \