Skip to content

Commit

Permalink
Fix slash escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardroche committed Dec 6, 2017
1 parent 9193e38 commit cd180ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/runner.py
Expand Up @@ -22,14 +22,14 @@
__version_info__ = (1, 10, 0)

_color_test_params_compiled_pattern = re.compile(
'^(?:(?:\<\?php )?(?://|#|\/\*|\<\!--|--)\s*)?'
'^(?:(?:\\<\\?php )?(?://|#|\\/\\*|\\<\\!--|--)\\s*)?'
'COLOR SCHEME TEST "(?P<color_scheme>[^"]+)"'
'(?:(?P<skip_if_not_syntax> SKIP IF NOT)? "(?P<syntax_name>[^"]+)")?'
'(?:\s*(?:--\>|\?\>|\*\/))?')
'(?:\\s*(?:--\\>|\\?\\>|\\*\\/))?')

_color_test_assertion_compiled_pattern = re.compile(
'^\s*(//|#|\/\*|\<\!--|--)\s*'
'(?P<repeat>\^+)'
'^\\s*(//|#|\\/\\*|\\<\\!--|--)\\s*'
'(?P<repeat>\\^+)'
'(?: fg=(?P<fg>[^ ]+)?)?'
'(?: bg=(?P<bg>[^ ]+)?)?'
'(?: fs=(?P<fs>[^=]*)?)?'
Expand All @@ -47,7 +47,7 @@ def is_valid_color_scheme_test_file_name(file_name):
if not file_name:
return False

return bool(re.match('^color_scheme_test.*\.[a-zA-Z0-9]+$', os.path.basename(file_name)))
return bool(re.match('^color_scheme_test.*\\.[a-zA-Z0-9]+$', os.path.basename(file_name)))


def get_color_scheme_test_params_color_scheme(view):
Expand Down

0 comments on commit cd180ec

Please sign in to comment.