fix regex for windows and linux compatibility

CRLF vs LF
This commit is contained in:
OMGeeky
2024-09-12 22:09:41 +02:00
parent 92530d4979
commit ced28ef9ea

View File

@@ -34,7 +34,7 @@ def remove_tileset_with_regex(content, tileset_name, tileset_first_gid):
first_gid = tileset_first_gid
name = tileset_name
modified = re.sub(
f' <[^<]*firstgid="{first_gid}"[^<]*({name})[\\S\\s]*?</tileset>\\n',
f' <[^<]*firstgid="{first_gid}"[^<]*({name})[\\S\\s]*?</tileset>\\r?\\n',
"",
content,
1,