Fixup actions. (#15057)
This commit is contained in:
parent
c8b09d0d4a
commit
c8da63382c
1 changed files with 8 additions and 4 deletions
|
@ -25,6 +25,13 @@ def _valid_community_layout(layout):
|
||||||
return (Path('layouts/default') / layout).exists()
|
return (Path('layouts/default') / layout).exists()
|
||||||
|
|
||||||
|
|
||||||
|
def _remove_newlines_from_labels(layouts):
|
||||||
|
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]
|
||||||
|
|
||||||
|
|
||||||
def info_json(keyboard):
|
def info_json(keyboard):
|
||||||
"""Generate the info.json data for a specific keyboard.
|
"""Generate the info.json data for a specific keyboard.
|
||||||
"""
|
"""
|
||||||
|
@ -100,10 +107,7 @@ def info_json(keyboard):
|
||||||
_check_matrix(info_data)
|
_check_matrix(info_data)
|
||||||
|
|
||||||
# Remove newline characters from layout labels
|
# Remove newline characters from layout labels
|
||||||
for layout_name, layout_json in layouts.items():
|
_remove_newlines_from_labels(layouts)
|
||||||
for key in layout_json['layout']:
|
|
||||||
if '\n' in key['label']:
|
|
||||||
key['label'] = key['label'].split('\n')[0]
|
|
||||||
|
|
||||||
return info_data
|
return info_data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue