Skip to content

questions about intended behaviour regarding comments and empty lines #55

Open
@jokeyrhyme

Description

@jokeyrhyme

Thanks so much for sharing this project! <3

I am testing this commit: 4d57849

Test cases:

  • nufmt --stdin "# hello\n\n\nlet foo = 'abc'\n\n\n# goodbye"
output:
# hello
let foo = 'abc'

# goodbye
  • nufmt --stdin "# hello\n\n\n# goodbye"
output:
# hello


# goodbye

I understand the experimental/early nature of this project, and I'm a huge fan of nu, so I'm curious about what idiomatic code looks like regarding comments and empty lines:

  • should nufmt preserve all empty lines, or is it idiomatic to have gaps no larger than a single empty line?
  • is it idiomatic to have "floating comments" that have one or more empty lines between them and the nearest code?
  • is it idiomatic to have multiple "floating comments" in a sequence, separated by one or more empty lines?
  • is it idiomatic for all comments to always be anchored to the next nearest code (e.g. no empty lines in between)?

Cheers! <3

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