Fix floating point numbers.

This commit is contained in:
Sergey Vartanov 2021-11-11 23:52:46 +03:00
parent 6e20668e24
commit ed0e0384b7
23 changed files with 358 additions and 332 deletions

View file

@ -206,7 +206,7 @@ class MapMachineHTML(MapMachineMoire, DefaultHTML):
def icon(self, arg: Arguments) -> str:
"""Image with Röntgen icon."""
size: str = self.clear(arg[1]) if len(arg) > 1 else 16
size: str = self.clear(arg[1]) if len(arg) > 1 else "16"
return (
f'<img class="icon" style="width: {size}px; height: {size}px;" '
f'src="out/icons_by_id/{self.clear(arg[0])}.svg" />'
@ -261,7 +261,7 @@ class MapMachineOSMWiki(MapMachineMoire, DefaultWiki):
def icon(self, arg: Arguments) -> str:
"""Image with Röntgen icon."""
size: str = self.clear(arg[1]) if len(arg) > 1 else 16
size: str = self.clear(arg[1]) if len(arg) > 1 else "16"
shape_id: str = self.clear(arg[0])
name: str = self.extractor.get_shape(shape_id).name
return f"[[File:Röntgen {name}.svg|{size}px]]"