Skip to content

Fix the problem that the inconsistent newline characters of different platforms #1480

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

Merged
merged 1 commit into from
Jan 28, 2022

Conversation

Hccake
Copy link

@Hccake Hccake commented Jan 28, 2022

The newline character of linux system is LF,
The default newline character in Windows system files is CRLF.

When git clones the code, it will automatically do a newline conversion for different platforms, which causes the newline of the tested file to be CRLF in the windows system, which does not match the expected return value.

In addition, because the CR character is used in three places in swagger-ui/index.html, and it is just before the carriage return character LF, which will cause the original CR character representation to be lost when git clone converts the newline character, so in order to cross The unification of the platform needs to ignore the comparison of CR characters when judging

@bnasslahsen
Copy link
Collaborator

@Hccake,

Thank you for you contribution to the project.

@bnasslahsen bnasslahsen merged commit 9f73f4e into springdoc:master Jan 28, 2022
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.

2 participants