Skip to content

Return invalid code when no , in nuon #74

@Rignchen

Description

@Rignchen

Describe the bug

Return invalid code when no , in nuon

nuon doesn't require you to have , to split variables, whitespace are just as valid, since nuon is natively supported by nushell it should also be supported by any nushell formatter

Steps To Reproduce

  1. get some nuon code with | to nuon
  2. remove a one of the comma
  3. try to format it with nufmt
nu -c ('{foobar: [[foo, bar]; [1, 2], [3, 4]], foobar2: [[foo, bar]; [1, 2], [3, 4]]}' | nufmt --stdin)
nu -c ('{foobar: [[foo, bar]; [1, 2], [3, 4]] foobar2: [[foo, bar]; [1, 2], [3, 4]]}' | nufmt --stdin)

Expected behavior

the outputed code should be valid nushell

Environment

  • rustc 1.91.1 (ed61e7d7e 2025-11-07)
[user@system:~]$ rustc --version
output here

If using Nix please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here

Notify maintainers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions