Skip to content

Comment spacing inside nodes #28

@nvll

Description

@nvll

Presently, dtsfmt always adds a newline before a comment if the previous line is not a comment. If a comment is at the top of a node though this turns:

node {
  // comment before property
  property = "value";
};

into

node {

  // comment before property
  property = "value";
};

Is that intentional, or a side effect? I think we could add a simple check for node there as well, since I can't think of any other situation where this behavior feels awkward, and the sep call already checks for \n\n circumstances otherwise.

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