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

only first newline is truncated from schema description #170

Open
scarf005 opened this issue Jul 2, 2023 · 0 comments · May be fixed by #172
Open

only first newline is truncated from schema description #170

scarf005 opened this issue Jul 2, 2023 · 0 comments · May be fixed by #172

Comments

@scarf005
Copy link
Contributor

scarf005 commented Jul 2, 2023

if (options?.withDescription && paramSchema) {
(paramSchema as SchemaObject).description = (paramItem.description ?? "")?.replace("\n", "");
}

as String.prototype.replace replaces at most once, String.prototype.replaceAll needs to be used instead.

however, stripping newlines could cause unexpected behavior. maybe template literal(`) should be used instead?

@scarf005 scarf005 linked a pull request Jul 2, 2023 that will close this issue
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 a pull request may close this issue.

1 participant