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

format_inner does not remove all trailing newlines #34

Closed
amtoine opened this issue Jun 22, 2023 · 1 comment · Fixed by #35
Closed

format_inner does not remove all trailing newlines #34

amtoine opened this issue Jun 22, 2023 · 1 comment · Fixed by #35
Labels
bug Something isn't working

Comments

@amtoine
Copy link
Member

amtoine commented Jun 22, 2023

Later we would need to fix the failing test, but nonetheless is a step forward!
I'm allright with a merge right now 😄

Originally posted by @AucaCoyan in #31 (comment)

the test here is the following

    #[test]
    fn remove_additional_lines() {
        let input = "let one = 1\n\n\n";
        let expected = "let one = 1\n";
        run_test(input, expected);
    }

i think it should become

    #[test]
    fn remove_additional_lines() {
        let input = "let one = 1\n\n\n";
        let expected = "let one = 1";
        run_test(input, expected);
    }

Note
the is no more newlines at the end of expected => this was moved out of the responsibility of format_inner in #31.

@amtoine amtoine added the bug Something isn't working label Jun 22, 2023
@AucaCoyan
Copy link
Contributor

The PR #35 solves this issue 🎉

@amtoine amtoine linked a pull request Dec 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants