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

Fix setting width greater than the default #154

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

krzema12
Copy link
Owner

@krzema12 krzema12 commented Apr 1, 2024

Resolves #152.

It looks like a coding error when porting snakeyaml-engine to Kotlin. The original project contains:

this.bestWidth = 80;
if (opts.getWidth() > this.bestIndent * 2) {
this.bestWidth = opts.getWidth();
}

which I'm reimplementing in this PR.

BTW, there's no unit test for this behavior in snakeyaml-engine, and ideally we'd like to add it there as well. It would have prevented this regression.

@krzema12 krzema12 requested a review from aSemy April 1, 2024 21:13
@krzema12 krzema12 marked this pull request as ready for review April 1, 2024 21:13
Copy link
Collaborator

@aSemy aSemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@krzema12 krzema12 merged commit dc89490 into main Apr 2, 2024
4 checks passed
@krzema12 krzema12 deleted the 152-fix-setting-width-larger-than-max-width branch April 2, 2024 11: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.

Max width doesn't work (works in upstream)
2 participants