Skip to content

When creating a KdlEntry with a string, it is unclear how to get v2 to use a multi-line string #121

Closed
@temportalflux

Description

@temportalflux

When constructing a KdlEntry with a string value (regardless of whether or not that string contains a new-line), it is unclear to me as the caller how to tell the entry's format to use a single line vs a multi-line string (when that entry is turned into a string itself).

kdl::KdlEntry::new("Some\nmulti-line\nstring".to_owned()).to_string()

I'm hoping I've just missed something in my doc reading and experimenting, but it seems like KdlEntry::ensure_v2 is only checking KdlEntryFormat::value_repr, which has no user-accessible api for forcing the representation to some form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions