Skip to content

Commit

Permalink
fix: Correctly parse old label props for layer names
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar committed Nov 16, 2024
1 parent 391ed6a commit 0943c95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keymap_drawer/dts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def __init__(self, name: str, parse: pp.ParseResults):
def get_string(self, property_re: str) -> str | None:
"""Extract last defined value for a `string` type property matching the `property_re` regex."""
out = None
for m in re.finditer(rf'(?:^|\s){property_re} = "(.*?)"', self.content):
out = m.group(1)
for m in re.finditer(rf'(?:^|\s)({property_re}) = "(.*?)"', self.content):
out = m.group(2)
return out

def get_array(self, property_re: str) -> list[str] | None:
Expand Down

0 comments on commit 0943c95

Please sign in to comment.