Skip to content

Having multiple appendix nodes in item node causes panic. #4

Open
@PokeyTheCat

Description

I only used the default options in Karabiner. I'm attempting to copy them into a private.xml and convert them to the JSON format. In my first attempt I've made it angry.

$ ./karaconv -i test.private.xml -o test.json
thread 'main' panicked at 'called Result::unwrap() on an Err value: duplicate field appendix', libcore/result.rs:945:5
note: Run with RUST_BACKTRACE=1 for a backtrace.

Example Item node copied from checkbox/for_pc_users.xml that causes issue:

<item>
  <name>Use PC Style Reload</name>
  <appendix>(Control+R to Command_L+R)</appendix>
  <appendix></appendix>
  <appendix>{{ PC_STYLE_BINDINGS_IGNORE_APPS_DESCRIPTION }}</appendix>
  <identifier>remap.copy_paste_winstyle_reload</identifier>
  <not>{{ PC_STYLE_BINDINGS_IGNORE_APPS }}</not>
  {{ PC_STYLE_BINDINGS_IGNORE_EXTRA }}
  <autogen>__KeyToKey__ KeyCode::R, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL, KeyCode::R, ModifierFlag::COMMAND_L</autogen>
</item>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions