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

Set Git line endings to autocrlf #689

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

axunonb
Copy link
Collaborator

@axunonb axunonb commented Jan 8, 2025

Necessary for using C# raw strings

Necessary for using C# raw strings
Copy link

sonarqubecloud bot commented Jan 8, 2025

@axunonb axunonb merged commit 6b933ce into ical-org:main Jan 8, 2025
4 checks passed
@axunonb axunonb deleted the pr/git-line-endings branch January 8, 2025 23:48
@axunonb
Copy link
Collaborator Author

axunonb commented Jan 9, 2025

@minichma This setting that I use with AppVeyor in another project still does not work with raw strings on GitHub.
For now we have to use regular strings, which are not so nice to read. I'll have a deeper look later.

@axunonb
Copy link
Collaborator Author

axunonb commented Jan 9, 2025

The line endings issue only pops up when comparing the ical serialization result with a C# Raw String. This is because line ending is defined as CRLF for iCalendar. CRLF is the default for *.cs files on Windows, but LF on Linux. We don't use this too often, so I think we can live with using regular strings like this one in such cases:

Does.Contain(
    "EXDATE;VALUE=DATE:20250101,20250102\r\n" +
    "EXDATE:20250102T140000Z\r\n" +
    "EXDATE;TZID=Europe/Berlin:20250101T101112,20250101T101113"));

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.

1 participant