Skip to content

Symbols ' and \\n fails to produce same output #253

@SauliusZ87

Description

@SauliusZ87

Saved and loaded data is not the same in case symbols ' and \n are used together

ryml::Tree tree;
ryml::NodeRef root = tree.rootref();
root |= ryml::MAP;
root["t"] = "t't\\nt";

std::string s = ryml::emitrs<std::string>(tree);

ryml::csubstr yml = ryml::csubstr(s.c_str(), s.size());
tree = ryml::parse_in_arena(yml);
root = tree.rootref();

auto s1 = root["t"].val();

const bool equal = s == s1;

Metadata

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