Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter creates unnecessary edits #66

Closed
rcjsuen opened this issue Nov 19, 2019 · 0 comments
Closed

Formatter creates unnecessary edits #66

rcjsuen opened this issue Nov 19, 2019 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Nov 19, 2019

It seems like the formatter is creating edits for whitespace that is legitimate. Consider the following Dockerfiles that is already using four spaces correctly for indentation.

EXPOSE 8000\
    8001

The following program prints out 1 even though I would've expected 0 since no formatting is required.

import { format } from './main';

let edits = format(
    "EXPOSE 8000\\\n    8001", {
        insertSpaces: true,
        tabSize: 4
    }
);
console.log(edits.length);
@rcjsuen rcjsuen added the bug label Nov 19, 2019
@rcjsuen rcjsuen self-assigned this Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant