Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
53ca79b922
1 changed files with 10 additions and 1 deletions
|
@ -164,7 +164,16 @@ class KeymapBeautifier:
|
||||||
key_symbols = [key_symbols[i] for i in self.index_conversion_map_reversed(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox)]
|
key_symbols = [key_symbols[i] for i in self.index_conversion_map_reversed(self.INDEX_CONVERSTION_LAYOUT_ergodox_pretty_to_LAYOUT_ergodox)]
|
||||||
|
|
||||||
padded_key_symbols = self.pad_key_symbols(key_symbols, input_layout)
|
padded_key_symbols = self.pad_key_symbols(key_symbols, input_layout)
|
||||||
current_pretty_output_layer = self.pretty_output_layer(layer.name[0].value, padded_key_symbols)
|
|
||||||
|
layer_identifier = None
|
||||||
|
if hasattr(layer.name[0], "value"):
|
||||||
|
layer_identifier = layer.name[0].value
|
||||||
|
elif hasattr(layer.name[0], "name"):
|
||||||
|
layer_identifier = layer.name[0].name
|
||||||
|
else:
|
||||||
|
raise AttributeError("Layer is missing both index and name (e.g., [BASE] = LAYOUT_ergodox(...))")
|
||||||
|
|
||||||
|
current_pretty_output_layer = self.pretty_output_layer(layer_identifier, padded_key_symbols)
|
||||||
# strip trailing spaces from padding
|
# strip trailing spaces from padding
|
||||||
layer_output.append(re.sub(r" +\n", "\n", current_pretty_output_layer))
|
layer_output.append(re.sub(r" +\n", "\n", current_pretty_output_layer))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue