mirror of
https://github.com/enzet/map-machine.git
synced 2025-07-30 23:00:25 +02:00
Fix floating point numbers.
This commit is contained in:
parent
6e20668e24
commit
ed0e0384b7
23 changed files with 358 additions and 332 deletions
|
@ -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]]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue