Skip to content

Generated files get CRLF line endings when scripts run on Windows #127

Closed

Description

@TMHSDigital

Why it matters

The maintainer develops on Windows. Several scripts write files using Python's default newline translation, and .gitattributes doesn't cover Markdown, HTML or JSON. A sync run on Windows can therefore produce whole-file CRLF diffs or sync-check drift that does not reproduce on Linux CI.

Evidence

  • write_text without newline="" in:
    • scripts/sync_from_registry.py:~467
    • scripts/add_frontmatter.py:59
    • scripts/add_comment_marker.py:110
    • scripts/release_doc_sync/sync.py:157,240,304
  • .gitattributes only pins *.py, *.sh, *.yml and VERSION.

Suggested approach

Add * text=auto eol=lf (with binary overrides for fonts and images) to .gitattributes, and pass newline="\n" in every write_text call.

Done when

Running the sync and fix scripts on Windows produces byte-identical output to Linux.

Activity

  1. added
    bug
    priority: low
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions