Skip to content

Docs generator producing bad line endings #5111

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
Nov 20, 2020
Merged

Conversation

stevejgordon
Copy link
Contributor

Exclude matching \r\n

When generating docs locally, on Windows, after running the tool, all files which include callouts then showed as modified, making review very difficult. I noticed that some of the callouts only included a newline (\n) and were missing the carriage return (\r).

Upon investigation, I found that the regex used for callout replacement was catching and removing the \r character. This change fixes the two places such replacement may occur and ensures we stop matching before the \r\n.

I'm not super hot on Regex so welcome opinions on the approach!

When generating docs locally I noticed that some of the callouts only
included a newline and were missing the carriage return. Upon
investigation, I found that the regex used for callout replacement was
catching and removing the \r character.

This change fixes the two places such replacement may occur and ensures
we stop matching before the \r\n.
@stevejgordon stevejgordon merged commit a74c510 into master Nov 20, 2020
@stevejgordon stevejgordon deleted the bug/docs-generator branch November 20, 2020 21:15
github-actions bot pushed a commit that referenced this pull request Nov 20, 2020
When generating docs locally I noticed that some of the callouts only
included a newline and were missing the carriage return. Upon
investigation, I found that the regex used for callout replacement was
catching and removing the \r character.

This change fixes the two places such replacement may occur and ensures
we stop matching before the \r\n.
github-actions bot pushed a commit that referenced this pull request Nov 20, 2020
When generating docs locally I noticed that some of the callouts only
included a newline and were missing the carriage return. Upon
investigation, I found that the regex used for callout replacement was
catching and removing the \r character.

This change fixes the two places such replacement may occur and ensures
we stop matching before the \r\n.
stevejgordon added a commit that referenced this pull request Nov 23, 2020
When generating docs locally I noticed that some of the callouts only
included a newline and were missing the carriage return. Upon
investigation, I found that the regex used for callout replacement was
catching and removing the \r character.

This change fixes the two places such replacement may occur and ensures
we stop matching before the \r\n.

Co-authored-by: Steve Gordon <[email protected]>
stevejgordon added a commit that referenced this pull request Nov 23, 2020
When generating docs locally I noticed that some of the callouts only
included a newline and were missing the carriage return. Upon
investigation, I found that the regex used for callout replacement was
catching and removing the \r character.

This change fixes the two places such replacement may occur and ensures
we stop matching before the \r\n.

Co-authored-by: Steve Gordon <[email protected]>
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