Merge pull request #3910 from LovCAPONE/bug_3862_fix_proper

Fix wmlparser3 creation unnecessary attributes.
This commit is contained in:
Lovens Weche 2019-02-12 15:06:24 -05:00 committed by GitHub
commit 515a3d6626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -503,14 +503,13 @@ class Parser:
Parse a WML fragment outside of strings.
"""
if not line: return
if line.startswith(b"#textdomain "):
self.textdomain = line[12:].strip().decode("utf8")
return
if not self.temp_key_nodes:
line = line.lstrip()
if not line: return
if line.startswith(b"#textdomain "):
self.textdomain = line[12:].strip().decode("utf8")
return
# Is it a tag?
if line.startswith(b"["):
self.handle_tag(line)