Skip to content

style(endpoint-share): keep the share-url example on one line - #914

Merged
paulrobertlloyd merged 1 commit into
mainfrom
fix/share-readme-prettier-ignore
Aug 24, 2026
Merged

paulrobertlloyd merged 1 commit into
mainfrom
fix/share-readme-prettier-ignore

Conversation

@rmdes

@rmdes rmdes commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Follows @paulrobertlloyd's comment on #910.

#910 cleared the failing Prettier check by accepting what Prettier wanted, which split the <link> over three lines and made it self-closing. As noted there, that is the wrong way round: a void element needs no trailing slash, and having one suggests a meaning it does not have.

This restores the original one-line example and adds <!-- prettier-ignore --> above the block instead.

On why Prettier caught it at all: .prettierignore excludes *.html, but this is a fenced ```html block inside a Markdown file, so that pattern never applied and Prettier formatted it as embedded code. The ignore comment scopes the exclusion to this one block, leaving the rest of the file checked.

Verified with git ls-files -z | xargs -0 npx prettier --check --ignore-unknown — all tracked files pass.

#910 fixed the failing Prettier check by accepting what Prettier wanted,
which split the `<link>` over three lines and made it self-closing. The
trailing slash has no meaning on a void element and reads as though it
does, so the original one-line form is the better documentation.

`.prettierignore` already excludes `*.html`, but this markup is a fenced
block inside a Markdown file, which that pattern does not match — so it
was formatted as embedded code rather than skipped. A
`<!-- prettier-ignore -->` comment excludes just this block and leaves
the rest of the file checked.

`prettier --check` passes across tracked files.
@paulrobertlloyd
paulrobertlloyd merged commit fb313e5 into main Aug 24, 2026
1 check passed
@paulrobertlloyd paulrobertlloyd added documentation Good documentation benefits everyone code quality Making things easier to understand labels Aug 24, 2026
rmdes added a commit that referenced this pull request Sep 5, 2026
Backports the fix from #914 onto this branch.

This branch is at ba8e19a, the commit that introduced the example and with
it a failing `prettier . --check`. Because `lint` runs
`lint:prettier && lint:js && lint:css`, that failure ends the linter step
before the tests run, so every PR targeting this branch goes red without its
tests being exercised — which is what happened to #829 for seven months.

Not a reformat. As noted in #910, Prettier wants to split the element and make
it self-closing, and that is the wrong way round for a void element. The
content here already matches what was agreed there: one line, no trailing
slash. All this adds is the `<!-- prettier-ignore -->` marker so Prettier
leaves it alone.

Result is byte-identical to main.
rmdes added a commit that referenced this pull request Sep 5, 2026
Follow-up to 2d7579e, which dropped the final newline while backporting #914.
Prettier flags a missing end-of-file newline, so the linter stayed red for a
different reason than before — the link element itself was already correct.

This writes main's bytes exactly; the two files now match by checksum.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Making things easier to understand documentation Good documentation benefits everyone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants