~ruther/qmk_firmware

fe0acdd2cba8ddd1dfd441f461c80e87a0e5a62d — Mateusz Ż 3 years ago 53d6149
[CLI] Fix broken layout rendering in `qmk info` by '\n' (#14970)

1 files changed, 6 insertions(+), 0 deletions(-)

M lib/python/qmk/info.py
M lib/python/qmk/info.py => lib/python/qmk/info.py +6 -0
@@ 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