From b1aadd109baf5b9ba3699f60fb717548dd1146e1 Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 18 Apr 2017 21:54:12 +0100 Subject: [PATCH] Update RegEx in js-to-json to match windowi eol (#1050) The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match. --- i18n/js_to_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/js_to_json.py b/i18n/js_to_json.py index c091152b6..e48b1cee1 100755 --- a/i18n/js_to_json.py +++ b/i18n/js_to_json.py @@ -48,7 +48,7 @@ import re from common import write_files -_INPUT_DEF_PATTERN = re.compile("""Blockly.Msg.(\w*)\s*=\s*'(.*)';?$""") +_INPUT_DEF_PATTERN = re.compile("""Blockly.Msg.(\w*)\s*=\s*'(.*)';?\r?$""") _INPUT_SYN_PATTERN = re.compile( """Blockly.Msg.(\w*)\s*=\s*Blockly.Msg.(\w*);""")