refactor(markdown): lead with methods, remove htmlOf, markdownOf and plainText #183

Merged
argus merged 1 commit from loop/178-markdown-methods into main 2026-10-08 09:36:11 +00:00
Collaborator

Closes #178

Part of #146. Per the owner decision on #146 (scope update on #178), the free functions of this slice are removed, with no wrappers and no deprecation.

What

  • MarkdownDocument.markdown() and MarkdownDocument.html() now hold the writers' bodies; markdownOf and htmlOf are gone.
  • List<MarkdownInline>.plainText() replaces the free plainText(inlines); exported as List.plainText from std/markdown.
  • Callers migrated: std/markdown (html writer, Markdown.html, docs example in lib.trb), its tests, and the compiler (reference/render, documentation/markdown, site-html, site-layout).
  • Unchanged: parsedDocument and the internal scanner helpers; the unrelated private plainText in project/manifest.trb.
  • docs/standard-library/markdown.md leads with the methods; the matching file under skills/ is updated to the same text.

Seed

No syntax change, no new native, no driver flag. The compiler now uses extend List<MarkdownInline> and use List.plainText from std/markdown; if the seed cannot build it, CI will show it here.

Test

No local build (CI only). Forge CI gates run on this PR; result recorded below in a comment.

Closes #178 Part of #146. Per the owner decision on #146 (scope update on #178), the free functions of this slice are removed, with no wrappers and no deprecation. ## What - `MarkdownDocument.markdown()` and `MarkdownDocument.html()` now hold the writers' bodies; `markdownOf` and `htmlOf` are gone. - `List<MarkdownInline>.plainText()` replaces the free `plainText(inlines)`; exported as `List.plainText` from `std/markdown`. - Callers migrated: `std/markdown` (html writer, `Markdown.html`, docs example in `lib.trb`), its tests, and the compiler (`reference/render`, `documentation/markdown`, `site-html`, `site-layout`). - Unchanged: `parsedDocument` and the internal scanner helpers; the unrelated private `plainText` in `project/manifest.trb`. - `docs/standard-library/markdown.md` leads with the methods; the matching file under `skills/` is updated to the same text. ## Seed No syntax change, no new native, no driver flag. The compiler now uses `extend List<MarkdownInline>` and `use List.plainText` from `std/markdown`; if the seed cannot build it, CI will show it here. ## Test No local build (CI only). Forge CI gates run on this PR; result recorded below in a comment.
refactor(markdown): lead with methods, remove htmlOf, markdownOf and plainText
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
pdisc / pdisc (pull_request) Successful in 2m16s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 22s
ci / bootstrap (linux-x64) (pull_request) Successful in 4m11s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 2m45s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
6066a76820
Part of #146.
fix(markdown): declare List.plainText in the module it is imported from
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
e666293db1
orion force-pushed loop/178-markdown-methods from e666293db1
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
to f164a187c8
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 2m15s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 11s
ci / bootstrap (linux-x64) (pull_request) Failing after 2m44s
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 4s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-08 08:19:01 +00:00
Compare
orion force-pushed loop/178-markdown-methods from f164a187c8
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 2m15s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 11s
ci / bootstrap (linux-x64) (pull_request) Failing after 2m44s
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 4s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to e4f80a3d6a
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 2m15s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / bootstrap (linux-x64) (pull_request) Failing after 2m40s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
2026-10-08 08:43:48 +00:00
Compare
orion force-pushed loop/178-markdown-methods from e4f80a3d6a
Some checks failed
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 2m15s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / bootstrap (linux-x64) (pull_request) Failing after 2m40s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
to 52e54203ec
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 2m16s
ci / which runners exist (pull_request) Successful in 12s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / bootstrap (linux-x64) (pull_request) Failing after 5m54s
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 5s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-08 08:50:31 +00:00
Compare
orion force-pushed loop/178-markdown-methods from 52e54203ec
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 6s
pdisc / pdisc (pull_request) Successful in 2m16s
ci / which runners exist (pull_request) Successful in 12s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / bootstrap (linux-x64) (pull_request) Failing after 5m54s
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / pack the seed (pull_request) Failing after 5s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
to 02d1323a1f
All checks were successful
ci / commit messages (pull_request) Successful in 3s
ci / what the change touches (pull_request) Successful in 3s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 2m13s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 7m26s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Successful in 2m44s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m55s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m28s
ci / every host emits the same C (pull_request) Successful in 4m25s
ci / pack the seed (pull_request) Successful in 8s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
2026-10-08 09:08:36 +00:00
Compare
Author
Collaborator

CI on 02d1323a: all checks green (bootstrap, tier A including std/example tests, doc check and the repository type check; tier B skipped as no IR/backend/runtime change).

CI on 02d1323a: all checks green (bootstrap, tier A including std/example tests, doc check and the repository type check; tier B skipped as no IR/backend/runtime change).
argus approved these changes 2026-10-08 09:36:10 +00:00
argus left a comment

Checklist (head 02d1323a):

  • Tests: ok. The existing std/markdown tests are migrated to inlines.plainText(); CI is green on this head (bootstrap, tier A with std/example tests, doc check, repo type check, pdisc, gates).
  • Correctness: ok. The writer bodies moved into MarkdownDocument.html() / .markdown() unchanged; Markdown.html calls parse(text).html(); plainText keeps its body as extend List<MarkdownInline>, re-exported with public use List.plainText. A grep of the PR head finds no remaining callers of htmlOf, markdownOf or the free plainText for markdown (the markdownOf in playground/*.mjs and the private plainText in project/manifest.trb are unrelated).
  • Scope: ok. It matches #178 as updated by the owner decision on #146 (free functions removed, no wrappers, all callers migrated).
  • Security/data: ok. No secrets, dependencies or storage formats touched.
  • Docs: ok. docs/standard-library/markdown.md leads with the methods, and the skills/ copy is identical.
  • Architecture: no boundary change beyond the removed public exports, which the owner decided.

Non-blocking:

  • docs/standard-library/markdown.md (and the skills copy), "html() and markdown()": the document.markdown() sentence runs past the wrapped line width; rewrap it on the next docs touch.
Checklist (head 02d1323a): - Tests: ok. The existing std/markdown tests are migrated to `inlines.plainText()`; CI is green on this head (bootstrap, tier A with std/example tests, doc check, repo type check, pdisc, gates). - Correctness: ok. The writer bodies moved into `MarkdownDocument.html()` / `.markdown()` unchanged; `Markdown.html` calls `parse(text).html()`; `plainText` keeps its body as `extend List<MarkdownInline>`, re-exported with `public use List.plainText`. A grep of the PR head finds no remaining callers of `htmlOf`, `markdownOf` or the free `plainText` for markdown (the `markdownOf` in `playground/*.mjs` and the private `plainText` in `project/manifest.trb` are unrelated). - Scope: ok. It matches #178 as updated by the owner decision on #146 (free functions removed, no wrappers, all callers migrated). - Security/data: ok. No secrets, dependencies or storage formats touched. - Docs: ok. `docs/standard-library/markdown.md` leads with the methods, and the `skills/` copy is identical. - Architecture: no boundary change beyond the removed public exports, which the owner decided. Non-blocking: - docs/standard-library/markdown.md (and the skills copy), "`html()` and `markdown()`": the `document.markdown()` sentence runs past the wrapped line width; rewrap it on the next docs touch.
argus merged commit 4a675e708c into main 2026-10-08 09:36:11 +00:00
argus deleted branch loop/178-markdown-methods 2026-10-08 09:36:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
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
torbscript/language!183
No description provided.