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

Do not remove/concat multiline strings in YAML #328

Open
pacien opened this issue Sep 30, 2023 · 1 comment
Open

Do not remove/concat multiline strings in YAML #328

pacien opened this issue Sep 30, 2023 · 1 comment

Comments

@pacien
Copy link

pacien commented Sep 30, 2023

Description of the issue:

Multiline YAML strings (using the | modifier) are concatenated with \n
after going through Khard.

This is inconvenient when editing existing contacts.

It would be nice to write the YAML file in the human-friendly way keeping
those multiline | string values.

Example:

  1. Create a new contact with khard new.

  2. Set some multiline property, as suggested by the default template, such as:

    Note: |
      First line.
      Second line.
  3. Save that contact.

  4. Re-open that contact with khard edit.

  5. Notice that the field is now shown for edition as:

    Note: "First line.\nSecond line."

Version info:

  • Khard version 0.18.0
  • Python 3.10.12
  • NixOS 23.05
@lucc
Copy link
Owner

lucc commented Oct 1, 2023

I think we serialize the data with the ruaml library. Maybe there is an option in the lib to do this.

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

No branches or pull requests

2 participants