From 07e8fab6d286a120c1eddbd055c108afcd6e42db Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 25 Jan 2023 21:14:23 +0100 Subject: maps: use strip block chomp operator The YAML strip block chomp operator causes all trailing newlines to be stripped from the map definition. --- scripts/generate_map_img.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/generate_map_img.py b/scripts/generate_map_img.py index 0605cbd8..254581f2 100755 --- a/scripts/generate_map_img.py +++ b/scripts/generate_map_img.py @@ -232,8 +232,7 @@ def generate_img(map_path: pathlib.Path): with open(map_path, 'r', encoding="utf8") as map_file: map_definition = yaml.full_load(map_file) - # remove the trailing new line - map_string = map_definition['map'][:-1] + map_string = map_definition['map'] # ensure that all keys are actually strings symbols = {str(k): v for k, v in map_definition['symbols'].items()} -- cgit v1.2.3