Skip to content

Commit f394afa

Browse files
Fixed xml declaration still using single quotes instead of double quotes
1 parent f78935f commit f394afa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

AndroidResourceTranslator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,10 @@ def update_xml_file(resource: AndroidResourceFile) -> None:
327327
with open(resource.path, "r+", encoding="utf-8") as f:
328328
content = f.read()
329329
content = re.sub(
330-
r"<\?xml version='1\.0' encoding='UTF-8'\?>",
330+
r"<\?xml version=['\"]1\.0['\"] encoding=['\"]utf-8['\"]\?>",
331331
'<?xml version="1.0" encoding="utf-8"?>',
332-
content
332+
content,
333+
flags=re.IGNORECASE
333334
)
334335
f.seek(0)
335336
f.write(content)

0 commit comments

Comments
 (0)