Skip to content

Fixing Carriage Return Line Feed (CRLF) order in docs #1792#1793

Merged
jensens merged 2 commits intocookiecutter:mainfrom
Lahiry:fix-new-line-characters-docs
Jun 12, 2023
Merged

Fixing Carriage Return Line Feed (CRLF) order in docs #1792#1793
jensens merged 2 commits intocookiecutter:mainfrom
Lahiry:fix-new-line-characters-docs

Conversation

@Lahiry
Copy link
Copy Markdown
Contributor

@Lahiry Lahiry commented Nov 7, 2022

In the "Working with line-ends special symbols LF/CRLF" section of the documentation we can see:

The special template variable _new_lines enforces a specific line ending. Acceptable variables: '\n\r' for CRLF and '\n' for POSIX.

Here is example how to force line endings to CRLF on any deployment:

{
    "project_slug": "sample",
    "_new_lines": "\n\r"
}

But this order is mistaken, since:

"The traditional order, when both control characters are used, is Carriage Return, then Line Feed.

The reason for this goes back to the old ASR-33 Teletype.

When a Carriage Return is issued to an ASR-33, the print head, if it is near the right margin, takes over a tenth of a second to return to the left margin, plus there is a bit of "bounce" when the left margin is hit.

If the order were Line Feed, then Carriage Return, the first printed character might occur a tenth of a second after the Carriage Return, and thus might end up printing (as a smear) halfway across the page. But if Line Feed comes after Carriage Return then the time taken by the Line Feed provides extra time for the print head to complete it's trip."

StackOverflow

So this PR aims at fixing the CRLF order to the traditional '\r\n'

@yuvaldolev
Copy link
Copy Markdown

Hi @Lahiry

We started working on a new community fork of the Cookiecutter project, named Cookieninja.
The fork is found at: https://github.com/cookieninja-generator/cookieninja

We have re-opened and merged your PR in the Cookieninja project at: cookieninja-generator/cookieninja#29

We're trying to bring the life back to this amazing project.
We are committed to reviewing and merging each PR in up to 2 weeks from the day it's opened (if there are no issues with it).
We'd really like you to join the fork, star it and contribute to it!

Thank you :)

Copy link
Copy Markdown
Member

@kurtmckee kurtmckee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pydanny @ssbarnea @jensens Please merge this PR.

It corrects a mistake in the docs that mis-orders CRLF escapes as \n\r instead of \r\n.

@kurtmckee
Copy link
Copy Markdown
Member

@jensens When this is merged, #1792 can be closed. (It is not linked and will not close automatically.)

@jensens jensens merged commit 2015fec into cookiecutter:main Jun 12, 2023
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.

4 participants