Skip to content

Conversation

@nielsdebruin
Copy link
Contributor

@nielsdebruin nielsdebruin commented Dec 16, 2024

What's changed?

Fixed a bug in parsing comments that caused duplicate linebreaks to be added to multiline comments using #.

Before the fix, the following test would fail, resulting in an output where an extra \n is added after each line starting with #

def test_multiline_comment_with_code():
    rewrite_run(python("""
    # This is a
    # multiline comment
    assert 1
    # This is another
    # multiline comment
    """))

Anyone you would like to review specifically?

@knutwannheden

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@nielsdebruin nielsdebruin added the bug Something isn't working label Dec 16, 2024
@nielsdebruin nielsdebruin self-assigned this Dec 16, 2024
@nielsdebruin nielsdebruin marked this pull request as ready for review December 16, 2024 11:17
@knutwannheden knutwannheden merged commit 0980a30 into main Dec 16, 2024
1 of 2 checks passed
@knutwannheden knutwannheden deleted the fix/comments branch December 16, 2024 15:26
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

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants