The Lingua extractor must not generate a parse error in case of extra blank spaces inside curly brackets.
diff --git a/mako/ext/linguaplugin.py b/mako/ext/linguaplugin.py
index aba039c..46b0d6a 100644
--- a/mako/ext/linguaplugin.py
+++ b/mako/ext/linguaplugin.py
@@ -31,7 +31,7 @@
             elif source.startswith(compat.b('elif')):
                 source = source[2:] # Replace "elif" with "if"
             source += compat.b('pass')
-            code = io.BytesIO(source)
+        code = io.BytesIO(source)
         for msg in self.python_extractor(
                 self.filename, self.options, code, code_lineno -1):
             if translator_strings:
diff --git a/test/templates/gettext.mako b/test/templates/gettext.mako
index 863b365..45b8262 100644
--- a/test/templates/gettext.mako
+++ b/test/templates/gettext.mako
@@ -125,3 +125,6 @@
 % except:
 <p>Failed!</p>
 % endtry
+
+## TRANSLATOR: this should not cause a parse error
+${ 1 }