diff options
author | Mateusz Ż <zochowski.mateusz@outlook.com> | 2021-10-31 09:21:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-31 01:21:20 -0700 |
commit | fe0acdd2cba8ddd1dfd441f461c80e87a0e5a62d (patch) | |
tree | a2e4e3e6c0dfbdd2a9cb614771bd394ede3264c5 /lib/python | |
parent | 53d614955db8b1cc57aeac9b036ca2816c54d486 (diff) | |
download | qmk_firmware-fe0acdd2cba8ddd1dfd441f461c80e87a0e5a62d.tar.gz qmk_firmware-fe0acdd2cba8ddd1dfd441f461c80e87a0e5a62d.zip |
[CLI] Fix broken layout rendering in `qmk info` by '\n' (#14970)
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/qmk/info.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 350e5e217..85131b929 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py | |||
@@ -99,6 +99,12 @@ def info_json(keyboard): | |||
99 | # Check that the reported matrix size is consistent with the actual matrix size | 99 | # Check that the reported matrix size is consistent with the actual matrix size |
100 | _check_matrix(info_data) | 100 | _check_matrix(info_data) |
101 | 101 | ||
102 | # Remove newline characters from layout labels | ||
103 | for layout_name, layout_json in layouts.items(): | ||
104 | for key in layout_json['layout']: | ||
105 | if '\n' in key['label']: | ||
106 | key['label'] = key['label'].split('\n')[0] | ||
107 | |||
102 | return info_data | 108 | return info_data |
103 | 109 | ||
104 | 110 | ||