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
Add string-options for ignoring newline differences #2496
Comments
I'm fine with this proposal. If @jnyrup is too, we can mark it as approved. |
This comment was marked as resolved.
This comment was marked as resolved.
Wondering whether enabling In implementation details, whether
My first thought is that (This can probably be considered my litmus test for this feature) |
Yes, when |
I agree. If there's such a need, probably introduce |
That's also what I would expect |
I don't think we have come to a conclusion yet. (I apologize for the long delay from my side) I've moved the proposal Back to If the intended implementation of To my knowledge in regular prose line breaking occurs instead of a space, i.e. "some value" is broken into "some\r\nvalue" to fit within the margins. I can't off the top of my head come up with a realistic case, where newlines don't replace something. We shouldn't try to guess whether a hyphen was inserted manually or by the line-breaking algorithm. I hope this more clearly expresses why I don't think "remove all newlines and then do simple equality" is the way to go. |
Good point. Now I'm wondering what this was supposed to fix in the first place. |
My original idea for this feature came from this comment 😄 I agree, that completely ignoring newlines might have some unintended consequences. For the use cases, that I see, the |
Background and motivation
Remaining issue from #2364
(see this comment for more details)
This should also fix #1247
API Proposal
Add the following options to the
EquivalencyAssertionOptions<T>
for stringsAPI Usage
Alternative Designs
No response
Risks
No response
Are you willing to help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?
Yes, please assign this issue to me.
The text was updated successfully, but these errors were encountered: