Repository navigation
Disable compressHTML: it ate spaces at inline-tag boundaries - #35
Conversation
Astro's default compressHTML removes the newline+indent when a line
break sits next to an inline tag, so source like
"lives in\n <a …>catalog.json</a>" rendered as "lives incatalog.json".
A build-output grep found the joined-word artifact on every page:
the footer on all 10 pages, plus index ("events.Storage Core"),
examples ("fixturesource"), skill, stack, roadmap, and staff pages.
Turning compression off fixes the class instead of policing every
line break next to an <a>/<code>/<strong>. Cost is negligible once
Cloudflare compresses the response: 27.3 KB -> 28.9 KB gzipped
across all 10 pages (raw 80.4 KB -> 99.5 KB).
Verified: rebuilt and re-grepped dist/ for text<tag and tag>text
joins (zero matches); npm run check is clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
There was a problem hiding this comment.
Pull request overview
Disables Astro’s HTML minification to prevent whitespace loss at text↔inline-tag boundaries, which has been causing visible word-joins across multiple pages in the built site.
Changes:
- Set
compressHTML: falseinastro.config.mjsto stop Astro from collapsing boundary whitespace. - Added an explanatory comment describing the rendering artifact this avoids.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Disable compressHTML: it ate spaces at inline-tag boundaries
Astro's default compressHTML removes the newline+indent when a line
break sits next to an inline tag, so source like
"lives in\n <a …>catalog.json</a>" rendered as "lives incatalog.json".
A build-output grep found the joined-word artifact on every page:
the footer on all 10 pages, plus index ("events.Storage Core"),
examples ("fixturesource"), skill, stack, roadmap, and staff pages.
Turning compression off fixes the class instead of policing every
line break next to an <a>/<code>/<strong>. Cost is negligible once
Cloudflare compresses the response: 27.3 KB -> 28.9 KB gzipped
across all 10 pages (raw 80.4 KB -> 99.5 KB).
Verified: rebuilt and re-grepped dist/ for text<tag and tag>text
joins (zero matches); npm run check is clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Drop stale compressHTML comment in Base.astro footer
The rule it stated — keep boundary whitespace on the tag's line —
stopped applying when #35 disabled compressHTML; the constraint now
lives as a comment in astro.config.mjs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

What
One-line config change:
compressHTML: falseinastro.config.mjs.Why
Astro's default HTML compression removes the newline+indent when a line break sits adjacent to an inline tag, so source like
lives in\n <a …>catalog.json</a>rendered as "lives incatalog.json" with no space. #34 fixed the instances in the copy it touched by keeping the boundary space on the tag's line, but a grep of the built output shows the artifact is everywhere:site:pegma-dev/pegma.dev,Agents:install skill)index.html: "events.Storage Core"examples.html: "lives incatalog.json", "fixturesource" (×3 recipes)skill.html: ~8 joins ("markdown:https://…", "and,catalog.json", …)stack.html,roadmap.html,staff/support.html,staff/support/ticket.html: assortedword<code>joinsWhy config instead of a source sweep
Note for after #34 merges: the comment it adds in
Base.astroabout keeping boundary whitespace on one line becomes moot (harmless, but can be dropped).Verification
dist/*.htmlfortext<a/text<code>/</a>text-style joins: zero matches (was ~35).npm run checkclean (astro check + both tsc projects).🤖 Generated with Claude Code