Skip to content

Commit

Permalink
[CLI] Fix broken layout rendering in qmk info by '\n' (#14970)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateossh committed Oct 31, 2021
1 parent 53d6149 commit fe0acdd
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 fe0acdd

Please sign in to comment.