Indent a quote by its depth, not by its marker's width #364

Merged
robbertbos merged 1 commit from quote-indent-by-depth into main 2026-09-19 14:39:57 +00:00
Owner

Follow-up to #340. With the > hidden, >tekst sat one character in and > tekst two, because NLDD sizes the hanging indent by the prefix's character count. A quote now indents by depth (the number of >), in both caret states: >tekst and > tekst line up, >> tekst sits one step further, and entering or leaving the line does not move the text.

Measured in the preview at 480px: every row of >een and > twee at 71.6px, >> drie at 81.2px; with the caret on the > twee line its first letter sits at 71.7px.

Trade-off: with the caret on a > line, the revealed marker hangs 1.4px from the bar. Kept that way because the text now sits at the smaller indent.

nlddTokens.test.ts never saw --_* variables (no _ in its regexes). This reads NLDD's internal --_marker-advance, so the guard now covers it: green with the real name, red with a misspelled one.

Gates: 1424 vitest, 122 e2e, typecheck, pre-commit.

Follow-up to #340. With the `>` hidden, `>tekst` sat one character in and `> tekst` two, because NLDD sizes the hanging indent by the prefix's character count. A quote now indents by depth (the number of `>`), in both caret states: `>tekst` and `> tekst` line up, `>> tekst` sits one step further, and entering or leaving the line does not move the text. Measured in the preview at 480px: every row of `>een` and `> twee` at 71.6px, `>> drie` at 81.2px; with the caret on the `> twee` line its first letter sits at 71.7px. Trade-off: with the caret on a `> ` line, the revealed marker hangs 1.4px from the bar. Kept that way because the text now sits at the smaller indent. `nlddTokens.test.ts` never saw `--_*` variables (no `_` in its regexes). This reads NLDD's internal `--_marker-advance`, so the guard now covers it: green with the real name, red with a misspelled one. Gates: 1424 vitest, 122 e2e, typecheck, pre-commit.
Indent a quote by its depth, not by its marker's width
All checks were successful
CI / release-scripts (pull_request) Successful in 7s
security-scan / SBOM (trivy) (pull_request) Successful in 11s
security-scan / Filesystem scan (trivy fs) (pull_request) Successful in 14s
security-scan / JS SCA (npm audit) (pull_request) Successful in 15s
security-scan / Python SAST (bandit) (pull_request) Successful in 21s
security-scan / Python SCA (pip-audit) (pull_request) Successful in 39s
test-build / build (frontend) (pull_request) Successful in 58s
CI / pre-commit (pull_request) Successful in 59s
CI / frontend-test (pull_request) Successful in 1m5s
test-build / build (backend) (pull_request) Successful in 1m10s
test-build / build (pull_request) Successful in 0s
CI / backend-test (pull_request) Successful in 2m28s
CI / e2e (pull_request) Successful in 4m26s
CI / release-scripts (push) Successful in 6s
security-scan / SBOM (trivy) (push) Successful in 11s
security-scan / Filesystem scan (trivy fs) (push) Successful in 16s
security-scan / JS SCA (npm audit) (push) Successful in 17s
security-scan / Python SAST (bandit) (push) Successful in 20s
security-scan / Python SCA (pip-audit) (push) Successful in 38s
CI / pre-commit (push) Successful in 59s
CI / frontend-test (push) Successful in 1m4s
publish-and-stage / build (frontend) (push) Successful in 1m12s
publish-and-stage / build (backend) (push) Successful in 1m25s
publish-and-stage / build (push) Successful in 0s
CI / backend-test (push) Successful in 2m33s
publish-and-stage / deploy-staging (push) Successful in 1m43s
CI / e2e (push) Successful in 4m26s
2f3cd44510
NLDD sizes the hanging indent by the prefix's character count, so once
the marker is hidden `>x` sits one advance in and `> x` two. Indent by
the number of `>` instead, in both caret states, so neither the space
nor the caret moves the text.

The token guard's regexes had no `_`, so no `--_*` variable was ever
checked. This change reads NLDD's internal --_marker-advance, so the
guard now covers it.
robbertbos deleted branch quote-indent-by-depth 2026-09-19 14:39:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
robbertbos/waggle!364
No description provided.