From 533375f435a66f67d994896bf1201309ce0a2664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=BB?= Date: Sun, 31 Oct 2021 09:21:20 +0100 Subject: [PATCH] [CLI] Fix broken layout rendering in `qmk info` by '\n' (#14970) --- lib/python/qmk/info.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 350e5e2178f9..85131b9299d4 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -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