Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip whitespace to pacify test workflow #5

Merged
merged 2 commits into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 44 additions & 43 deletions readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -931,49 +931,49 @@ for half_row, hold_row in zip(half_table, hold_table):
hold_row_l, hold_row_r = hold_row[:length], hold_row[length:]
for lr, hold_row_lr in ('l', hold_row_l), ('r', hold_row_r):
if lr == mode:
for half in half_row:
code = half
code = convert_symbol(code)
shifted_code = get_shifted(code)
if shift == "true" and shifted_code != None:
code = shifted_code
elif target == 'svg' and shifted_code != None:
code = get_translated(code)
shifted_code = trim_shifted(code, shifted_code)
code = 'U_S(' + str(wrap_basic(shifted_code)) + ', ' + str(wrap_basic(code)) +')'
code = get_translated(code)
if code == '':
code = 'U_NU'
code = wrap_basic(code)
results += (str(code) + ',').ljust(width)
for half in half_row:
code = half
code = convert_symbol(code)
shifted_code = get_shifted(code)
if shift == "true" and shifted_code != None:
code = shifted_code
elif target == 'svg' and shifted_code != None:
code = get_translated(code)
shifted_code = trim_shifted(code, shifted_code)
code = 'U_S(' + str(wrap_basic(shifted_code)) + ', ' + str(wrap_basic(code)) +')'
code = get_translated(code)
if code == '':
code = 'U_NU'
code = wrap_basic(code)
results += (str(code) + ',').ljust(width)
else:
for hold in hold_row_lr:
if hold in mods_dict:
code = wrap_basic(get_translated(hold))
else:
hold = get_translated(hold)
if hold == '' or hold in layers_dict:
code = 'U_NA'
if target == 'svg' and hold == current_layer_name:
code = 'U_HELD(' + code + ')'
elif hold == 'LOCK_CUR' or hold == 'LOCK_OPP':
if hold == 'LOCK_CUR':
layer_name = current_layer_name
else:
layer_name = opposite_layer_name
if target == 'qmk':
code = 'TD(U_TD_' + layer_name + ')'
elif target == 'zmk':
code = '&u_to_' + layer_name
elif target == 'kmonad':
code = 'U_DF(' + layer_name + ')'
elif target == 'svg':
code = 'U_DF(' + layer_name + ')'
elif target == 'kmk':
code = 'U_DF(' + layer_name + ')'
else:
code = wrap_basic(hold)
results += (str(code) + ',').ljust(width)
for hold in hold_row_lr:
if hold in mods_dict:
code = wrap_basic(get_translated(hold))
else:
hold = get_translated(hold)
if hold == '' or hold in layers_dict:
code = 'U_NA'
if target == 'svg' and hold == current_layer_name:
code = 'U_HELD(' + code + ')'
elif hold == 'LOCK_CUR' or hold == 'LOCK_OPP':
if hold == 'LOCK_CUR':
layer_name = current_layer_name
else:
layer_name = opposite_layer_name
if target == 'qmk':
code = 'TD(U_TD_' + layer_name + ')'
elif target == 'zmk':
code = '&u_to_' + layer_name
elif target == 'kmonad':
code = 'U_DF(' + layer_name + ')'
elif target == 'svg':
code = 'U_DF(' + layer_name + ')'
elif target == 'kmk':
code = 'U_DF(' + layer_name + ')'
else:
code = wrap_basic(hold)
results += (str(code) + ',').ljust(width)
results += '\\\n'
results = results.rstrip(', \\\n')
results
Expand Down Expand Up @@ -1313,7 +1313,7 @@ for layer, name in layers_table:
results += 'MIRYOKU_X(' + ( stripped + ', ').ljust(width)
results += '"' + name + '"'
results += ') \\\n'
results = results.rstrip('\\\n')
results = results.rstrip(' \\\n')
return results
#+END_SRC

Expand Down Expand Up @@ -1347,6 +1347,7 @@ for layer, name in layers_table:
elif target == 'svg':
results += '"' + name + '"' + '\n'
i += 1
results = results.rstrip('\n')
return results
#+END_SRC

Expand Down
Loading