terrain2wiki tool: python 3.12 compatibility

This commit is contained in:
Severin Glöckner 2024-06-08 20:56:21 +02:00
parent 1b55cee68a
commit 305166e977

View file

@ -34,7 +34,7 @@ def parse_terrain(data):
"""
# Remove all comments.
data = "\n".join([i for i in data.split("\n") if not re.match("^\s*#", i)])
data = "\n".join([i for i in data.split("\n") if not re.match(r"^\s*#", i)])
terrains = re.compile(r"\[terrain_type\](.*?)\[\/terrain_type\]", re.DOTALL).findall(data)
data = """{{AutogeneratedWML}}{| border="1"