-
Notifications
You must be signed in to change notification settings - Fork 16
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
Preserve EOL to be able to format description #35
Comments
I can't change the default behaviour due to backwards compatibility, but perhaps an option could be added to change this. Something like an |
I don't know. It's tricky because sometimes you might want to break the lines just to have a more readable source code (e.g. you want to limit the lines to 80 characters) while sometimes you want the line break to be kept for the Markdown formatting for Swagger UI. There is somewhat the same problem if you use a YAML file directly: one line break is ignored (same behavior has your lib), you need an additional empty line to count as a line break in Swagger UI (so basically \n\n becomes \n in the end result). |
At the moment the following code will collapse everything into one line. It makes the description harder to read once rendered in Swagger UI, and prevent using Markdown syntax to format things like lists.
Actual result:
Expected result:
Is there any way to preserve the end of line?
The text was updated successfully, but these errors were encountered: