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 text block incidental whitespace handling #2147

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

mtdowling
Copy link
Member

This commit fixes the handling of incidental whitespace on the last line of a text block when parsing, and fixes the formatting of text blocks so that indentation and non-incidental whitespace isn't removed.

There was a bug in parsing the last line of text blocks that needed to be fixed, and then the formatter needed special handling for serializing text blocks.

Closes #2141


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling requested a review from a team as a code owner February 16, 2024 19:39
@mtdowling mtdowling force-pushed the fix-text-block-parsing-and-formatting branch from 895dfa3 to c327f51 Compare February 16, 2024 19:59
This commit fixes the handling of incidental whitespace on the last
line of a text block when parsing, and fixes the formatting of text
blocks so that indentation and non-incidental whitespace isn't
removed.

There was a bug in parsing the last line of text blocks that needed
to be fixed, and then the formatter needed special handling for
serializing text blocks.

Closes #2141
@mtdowling mtdowling force-pushed the fix-text-block-parsing-and-formatting branch from c327f51 to 40855c1 Compare February 16, 2024 20:53
@mtdowling mtdowling merged commit d3e56a9 into main Feb 16, 2024
11 checks passed
@mtdowling mtdowling deleted the fix-text-block-parsing-and-formatting branch September 22, 2024 00:13
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.

Smithy formatter throws out formatting of body elements
3 participants