diff --git a/zerver/management/commands/makemessages.py b/zerver/management/commands/makemessages.py index 5f9c3c683b..e9f36f7442 100644 --- a/zerver/management/commands/makemessages.py +++ b/zerver/management/commands/makemessages.py @@ -152,9 +152,9 @@ class Command(makemessages.Command): # type: (str) -> str # Removes multi line comments. - data = re.sub(multiline_js_comment, "", data) + data = multiline_js_comment.sub('', data) # Removes single line (//) comments. - data = re.sub(singleline_js_comment, "", data) + data = singleline_js_comment.sub('', data) return data def get_translation_strings(self):