Skip to content

Default namespaces cause maps to end parsing early #2

@cap10morgan

Description

@cap10morgan

Here's a test to reproduce:

fn test_default_map_namespace_syntax() {
    let input = "{:thingy #:foo{:bar \"baz\"} :more \"stuff\"}";
    let cfg = edn::read_string(&input).unwrap();
    if let Edn::Map(cfg_map) = cfg {
        assert!(cfg_map.contains_key(&Edn::Key("thingy")));
        assert!(cfg_map.contains_key(&Edn::Key("more")));        // test fails here
    }
}

Observed:

The test fails in the second assertion (i.e. that the map contains a :more key).

Expected:

Both assertions should pass.

If you remove the #:foo default map key namespace, both assertions pass.

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