Skip to content

Commit

Permalink
[CLI] Fix broken layout rendering in qmk info by '\n' (qmk#14970)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateossh authored and plam4u committed Nov 14, 2021
1 parent eb69e9a commit 533375f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/python/qmk/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def info_json(keyboard):
# Check that the reported matrix size is consistent with the actual matrix size
_check_matrix(info_data)

# Remove newline characters from layout labels
for layout_name, layout_json in layouts.items():
for key in layout_json['layout']:
if '\n' in key['label']:
key['label'] = key['label'].split('\n')[0]

return info_data


Expand Down

0 comments on commit 533375f

Please sign in to comment.