Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/rust-port-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ The line form raised two of its own instead, and both were settled in the corpus

Four tools were run rather than remembered, because what each one does here is exactly the kind of claim that decays into a plausible memory. An unclosed marker exempts to the end of the file in `markdownlint`, to the end of the enclosing block in `ruff`, and **nothing at all** in `prettier` — which was the surprise, since prettier is the closest precedent and the source of the naming. It pairs the markers as siblings in a tree, so with no partner there is no range; an unclosed opener there protects nothing, as does one whose partner sits inside a fence or one level deeper in a quote. On nesting all three agree, and `markdownlint` demonstrates it twice: one closing marker undoes any number of openings.

This tool exempts to the end of the file, against its closest precedent, and reports the unclosed marker on stdout. The two failures are not equal, and that is the whole of the argument: exempting too much declines to improve a file, while exempting too little joins lines an author marked as unjoinable, and the region form exists for content where joining destroys meaning. It cuts the other way from the line form's own rule, where over-reach costs one extra paragraph rather than the remainder of a document. What the report buys is the one thing wrong with the end-of-file answer, which is that nothing changed, so `--fail-on-change` has nothing to say and the file quietly stopped being processed. It is a warning and not an error: `errors` decides the exit code and `warnings` does not, which is why the payload grew a key rather than an entry.
This tool exempts to the end of the file, against its closest precedent, and reports the unclosed marker on stderr, or in the `warnings` array under `--json`. The two failures are not equal, and that is the whole of the argument: exempting too much declines to improve a file, while exempting too little joins lines an author marked as unjoinable, and the region form exists for content where joining destroys meaning. It cuts the other way from the line form's own rule, where over-reach costs one extra paragraph rather than the remainder of a document. What the report buys is the one thing wrong with the end-of-file answer, which is that nothing changed, so `--fail-on-change` has nothing to say and the file quietly stopped being processed. It is a warning and not an error: `errors` decides the exit code and `warnings` does not, which is why the payload grew a key rather than an entry.

Nesting is a switch and not a counter, following all three. A counter would turn one missing inner marker into the end-of-file exemption this design is trying to make rare, and regions in a hand-written document are not composed from independent sources the way a counter would pay for.

Expand Down
2 changes: 1 addition & 1 deletion mirrors/py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:

`unwrap-markdown-prose-py` joins manual soft-wrap line breaks in Markdown prose, leaving code fences, tables, lists, front matter, hard breaks, and label rows untouched. `unwrap-markdown-prose-py-check` reports the same files and rewrites nothing, for repositories that want the signal rather than the edit.

Exclusions belong to the tool rather than to the framework: `.unwrapignore` and `--exclude` reach every way of invoking it, while `pre-commit`'s own `exclude:` key reaches only this one. A paragraph opts out from inside the document instead: `<!-- unwrap-ignore -->` on a line of its own leaves the paragraph after it as written, and `<!-- unwrap-ignore-start -->` with `<!-- unwrap-ignore-end -->` leaves everything between them. A missing closing marker exempts the rest of the file and is reported on stdout.
Exclusions belong to the tool rather than to the framework: `.unwrapignore` and `--exclude` reach every way of invoking it, while `pre-commit`'s own `exclude:` key reaches only this one. A paragraph opts out from inside the document instead: `<!-- unwrap-ignore -->` on a line of its own leaves the paragraph after it as written, and `<!-- unwrap-ignore-start -->` with `<!-- unwrap-ignore-end -->` leaves everything between them. A missing closing marker exempts the rest of the file and is reported on stderr, naming the file and the line the region opened on; under `--json` it travels in the `warnings` array on stdout instead.

`rev:` takes a commit SHA as well as a tag. A tag here names one tree because a ruleset refuses to move it, which holds for as long as this repository does; a SHA names one tree because the name is derived from the content, so no other tree can be served under it. Pin the SHA if that difference matters to you, remembering that `pre-commit autoupdate` rewrites either form to the newest tag, so such a pin lasts until somebody runs it.

Expand Down
2 changes: 1 addition & 1 deletion mirrors/rs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:

These ids need a Rust toolchain on the machine that installs them. `pre-commit` provisions one if cargo is absent, and that costs far more than the hook saves, so the choice between this repository and [markdown-prose-hooks-py](https://github.com/michen00/markdown-prose-hooks-py) turns on whether cargo is already installed rather than on any timing figure. Upstream's readme makes that argument in full.

Exclusions belong to the tool rather than to the framework: `.unwrapignore` and `--exclude` reach every way of invoking it, while `pre-commit`'s own `exclude:` key reaches only this one. A paragraph opts out from inside the document instead: `<!-- unwrap-ignore -->` on a line of its own leaves the paragraph after it as written, and `<!-- unwrap-ignore-start -->` with `<!-- unwrap-ignore-end -->` leaves everything between them. A missing closing marker exempts the rest of the file and is reported on stdout.
Exclusions belong to the tool rather than to the framework: `.unwrapignore` and `--exclude` reach every way of invoking it, while `pre-commit`'s own `exclude:` key reaches only this one. A paragraph opts out from inside the document instead: `<!-- unwrap-ignore -->` on a line of its own leaves the paragraph after it as written, and `<!-- unwrap-ignore-start -->` with `<!-- unwrap-ignore-end -->` leaves everything between them. A missing closing marker exempts the rest of the file and is reported on stderr, naming the file and the line the region opened on; under `--json` it travels in the `warnings` array on stdout instead.

`rev:` takes a commit SHA as well as a tag. A tag here names one tree because a ruleset refuses to move it, which holds for as long as this repository does; a SHA names one tree because the name is derived from the content, so no other tree can be served under it. Pin the SHA if that difference matters to you, remembering that `pre-commit autoupdate` rewrites either form to the newest tag, so such a pin lasts until somebody runs it.

Expand Down
Loading