Skip to content

site: accept indented and titled Pro source fences - #488

Merged
vishr merged 3 commits into
masterfrom
site/pro-indented-source-fences
Nov 4, 2026
Merged

vishr merged 3 commits into
masterfrom
site/pro-indented-source-fences

Conversation

@vishr

@vishr vishr commented Nov 4, 2026

Copy link
Copy Markdown
Member

Prepares for the next Echo Pro docs export (labstack/echo-pro#166 follow-ups): the install page nests its code blocks under numbered steps and titles the .netrc block.

site/scripts/pro-publication.mjs now mirrors the exporter's rules exactly: a source-include fence may be indented by 1 to 3 spaces with a matching empty closing fence, and may carry one title="..." limited to [a-zA-Z0-9_./~ -]. Fences indented 4 or more spaces, extra attributes and every other existing rejection still fail. Tests and the publication corpus cover both new forms.

Checks: npm test (495 passed); npm run build with the new export renders all three install code blocks inside their list items and the ~/.netrc title.

vishr added 3 commits November 4, 2026 07:35
The Echo Pro exporter now nests source includes under numbered list
steps (1 to 3 spaces) and allows one literal title from a small
alphabet. Mirror both rules in the publication checker; every other
rejection stays.
Mirror the exporter's sourceFence rule: indent, language, an optional
title as its own token, then the file. Removing the title before
splitting could join tokens and check a different language or file than
the site renders. The publication corpus is the exporter's copy.
Match the exporter's explicit [a-zA-Z0-9_./#-]+ path class so both sides
accept the same lines; the corpus copy adds a Unicode-space case.
@vishr
vishr merged commit 1dca2e8 into master Nov 4, 2026
1 check passed
@vishr
vishr deleted the site/pro-indented-source-fences branch November 4, 2026 23:36
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.

1 participant