Skip to content

fix(revealjs): normalize line endings in vendored-asset drift test#386

Merged
cderv merged 1 commit into
mainfrom
bugfix/bd-ol45i8oe-revealjs-eol-normalize
Jul 8, 2026
Merged

fix(revealjs): normalize line endings in vendored-asset drift test#386
cderv merged 1 commit into
mainfrom
bugfix/bd-ol45i8oe-revealjs-eol-normalize

Conversation

@cderv

@cderv cderv commented Jul 8, 2026

Copy link
Copy Markdown
Member

The vendored_reveal_assets_match_npm_package test byte-compares the reveal.js
assets embedded via include_str! against the copy in
node_modules/reveal.js/dist. On a Windows checkout with core.autocrlf=true,
git rewrites the committed-LF vendored files to CRLF on disk, so the embedded
bytes gain CRLF while the npm copy stays LF — the test fails on line endings
alone, with no actual content divergence.

These assets are served verbatim and CRLF vs LF is irrelevant to browsers; the
test exists to catch content drift when reveal.js is bumped, not line endings.
Normalize both sides before comparing so only real drift fails.

Test Plan

  • On a Windows checkout (core.autocrlf=true), cargo nextest run -p quarto-core vendored_reveal_assets_match_npm_package passes
  • Altering a vendored reveal asset's content still fails the test

The test byte-compared the include_str!-embedded reveal assets against
the npm dist copy. On a Windows checkout, core.autocrlf rewrites the
committed-LF vendored files to CRLF on disk, so the embedded bytes gain
CRLF while the npm copy stays LF -- a false mismatch on line endings
alone. These assets are served verbatim and CRLF vs LF is irrelevant to
browsers; the test's job is to catch content drift when reveal.js is
bumped, not line endings. Normalize both sides before comparing so only
real drift fails.
@posit-snyk-bot

posit-snyk-bot commented Jul 8, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv merged commit 65c8958 into main Jul 8, 2026
8 checks passed
@cderv cderv deleted the bugfix/bd-ol45i8oe-revealjs-eol-normalize branch July 8, 2026 18:00
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