mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-02 19:02:12 +02:00
Issue #62: fix selector escaping.
This commit is contained in:
parent
eae7f706f2
commit
e284e34c72
2 changed files with 3 additions and 7 deletions
|
@ -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()])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue