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

Keep trailing doc comment spaces in IDL serializer #2116

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

mtdowling
Copy link
Member

Closes #2115

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 January 26, 2024 21:11
@mtdowling mtdowling requested a review from milesziemer January 26, 2024 21:11
.pushState()
// See https://github.com/smithy-lang/smithy/issues/2115
.trimTrailingSpaces(false)
.setNewlinePrefix("/// ")
.write(documentation.replace("$", "$$"))
Copy link
Contributor

Choose a reason for hiding this comment

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

question: what's the motivation for this replace btw? I didn't think $ had any special meaning in doc comments...

Copy link
Member Author

Choose a reason for hiding this comment

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

The write thing this goes through treats them specially as placeholders, so we have to escape them. The writer later turns it back into "$".

@mtdowling mtdowling merged commit e671ac9 into main Jan 26, 2024
11 checks passed
@mtdowling mtdowling deleted the keep-trailing-spaces-in-docs 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.

IDL Model serializer ignores trailing whitespace in documentation
3 participants