Browse Source

[CLI] Fix broken layout rendering in `qmk info` by '\n' (#14970)

pull/14995/head
Mateusz Ż 2 years ago
committed by GitHub
parent
commit
fe0acdd2cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      lib/python/qmk/info.py

+ 6
- 0
lib/python/qmk/info.py View File

@ -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


Loading…
Cancel
Save