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

Incorrect indent for multiline string within list #332

Closed
noahnu opened this issue Aug 24, 2020 · 1 comment
Closed

Incorrect indent for multiline string within list #332

noahnu opened this issue Aug 24, 2020 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers released

Comments

@noahnu
Copy link
Collaborator

noahnu commented Aug 24, 2020

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

Input:

def test_snapshot(snapshot):
    data = {
        "key": [
            "line 1\nline 2"
        ]
    }
    assert data == snapshot
pytest --snapshot-update

Output:

# name: test_snapshot
  <class 'dict'> {
    'key': <class 'list'> [
  '
        line 1
        line 2
      ',
    ],
  }
---

Expected behavior

The multiline string ' should be indented:

# name: test_snapshot
  <class 'dict'> {
    'key': <class 'list'> [
      '
        line 1
        line 2
      ',
    ],
  }
---

syrupy==0.6.1

@noahnu noahnu added bug Something isn't working good first issue Good for newcomers labels Aug 24, 2020
@noahnu noahnu assigned noahnu and unassigned noahnu Aug 24, 2020
@noahnu noahnu closed this as completed in 3b06a98 Aug 24, 2020
syrupy-bot pushed a commit that referenced this issue Aug 24, 2020
# [0.7.0](v0.6.1...v0.7.0) (2020-08-24)

### Features

* bugfix, pass indent to multiline open tag, close [#332](#332) ([#334](#334)) ([3b06a98](3b06a98))
@syrupy-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers released
Projects
None yet
Development

No branches or pull requests

2 participants