Skip to content

Conversation

@max-sixty
Copy link
Collaborator

No description provided.

claude and others added 2 commits November 27, 2025 12:20
…o#833)

The `indentation()` function was capturing all characters from the start
of the line to the macro position, which incorrectly included code like
`let output = ` when the macro wasn't at the beginning of a line.

Now only leading whitespace is captured, which is the correct behavior
for aligning multi-line snapshot content.

Fixes mitsuhiko#833
Adds tests for scenarios where a snapshot macro appears in various code constructs, such as `if` blocks, `match` arms, closures, or deeply nested expressions. This ensures correct indentation capture regardless of surrounding code.
@max-sixty
Copy link
Collaborator Author

closes #833

@max-sixty max-sixty merged commit 778f733 into mitsuhiko:master Nov 27, 2025
15 checks passed
@max-sixty max-sixty deleted the claude/fix-issue-833-01TwvMmqndwx3ArY3sRF5rXC branch November 27, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants