Issue #62: fix selector escaping.

This commit is contained in:
Sergey Vartanov 2021-07-24 20:01:08 +03:00
parent eae7f706f2
commit e284e34c72
2 changed files with 3 additions and 7 deletions

View file

@ -168,7 +168,9 @@ class NodeMatcher(Matcher):
"""Get MapCSS 0.2 selector for one key."""
if value == "*":
return f"[{key}]"
return f"[{key}={value}]"
if '"' in value:
return f"[{key}='{value}']"
return f'[{key}="{value}"]'
return "".join([get_selector(x, y) for (x, y) in self.tags.items()])

View file

@ -992,12 +992,6 @@ node_icons:
{shape: digit_4, offset: [-2, 2]},
{shape: digit_0, offset: [2, 2]},
]
- tags: {traffic_sign: maxspeed, maxspeed: ".."}
shapes: [
circle_11,
{shape: digit_3, offset: [-2, 0], color: "#FFFFFF"},
{shape: digit_0, offset: [2, 0], color: "#FFFFFF"},
]
- tags: {traffic_sign: stop}
shapes: [stop]
- tags: {highway: give_way}