xonecas.io
70160
Ce

cel-tui / commit 037080c

feat(components): use yoctomarkdown token API for Markdown component

Replace local tokenizer with yoctomarkdown ^0.1.0 dependency.
The component now imports tokenize/BlockToken/InlineSpan from
yoctomarkdown and re-exports them for consumers.

- Remove ~530 lines of local tokenizer + inline parser + tests
  (those are yoctomarkdown's responsibility now)
- Keep component rendering logic, theme system, and component tests
- Add yoctomarkdown as runtime dep of @cel-tui/components
- Remove completed TODO item

xonecas2026-04-04 037080cfbc9274e0ecfb987d47dd081e50024c14 parent 8d66159

6 files changed

TODO.md+0−2
@@ -24,8 +24,6 @@ Remaining work, known bugs, and planned improvements.
2424
2525 ## Not Yet Implemented
2626
27-- ❌ **`Markdown` component** — Depends on yoctomarkdown exposing an ANSI-free token API (`BlockToken`/`InlineSpan` types). Once available, the `Markdown(content, props?)` component in `@cel-tui/components` maps tokens to cel-tui Nodes. See `packages/components/src/markdown.ts`. Tracked upstream in yoctomarkdown.
28-
2927 - ❌ Bracketed paste mode support
3028
3129 ## Future Enhancements
bun.lock+11−0
@@ -21,6 +21,7 @@
2121 "dependencies": {
2222 "@cel-tui/core": "workspace:*",
2323 "@cel-tui/types": "workspace:*",
24+ "yoctomarkdown": "^0.1.0",
2425 },
2526 "peerDependencies": {
2627 "typescript": ">=5.0.0",
@@ -90,6 +91,8 @@
9091
9192 "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
9293
94+ "ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
95+
9396 "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
9497
9598 "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
@@ -140,6 +143,10 @@
140143
141144 "punycode.js": ["punycode.js@2.3.1", "", {}, "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="],
142145
146+ "string-width": ["string-width@8.2.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw=="],
147+
148+ "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
149+
143150 "typedoc": ["typedoc@0.28.18", "", { "dependencies": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", "markdown-it": "^14.1.1", "minimatch": "^10.2.4", "yaml": "^2.8.2" }, "peerDependencies": { "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" }, "bin": { "typedoc": "bin/typedoc" } }, "sha512-NTWTUOFRQ9+SGKKTuWKUioUkjxNwtS3JDRPVKZAXGHZy2wCA8bdv2iJiyeePn0xkmK+TCCqZFT0X7+2+FLjngA=="],
144151
145152 "typedoc-plugin-markdown": ["typedoc-plugin-markdown@4.11.0", "", { "peerDependencies": { "typedoc": "0.28.x" } }, "sha512-2iunh2ALyfyh204OF7h2u0kuQ84xB3jFZtFyUr01nThJkLvR8oGGSSDlyt2gyO4kXhvUxDcVbO0y43+qX+wFbw=="],
@@ -151,5 +158,9 @@
151158 "undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
152159
153160 "yaml": ["yaml@2.8.3", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg=="],
161+
162+ "yoctocolors": ["yoctocolors@2.1.2", "", {}, "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug=="],
163+
164+ "yoctomarkdown": ["yoctomarkdown@0.1.0", "", { "dependencies": { "string-width": "^8.2.0", "strip-ansi": "^7.2.0", "yoctocolors": "^2.1.2" }, "peerDependencies": { "typescript": "^5.9.3" }, "bin": { "yoctomarkdown": "src/cli.ts" } }, "sha512-N5ccZ2dQA3ZJSbImSeSxqfDHC/aBcyPWc5WI57corl4gB2Vsr4W11jswPhVNNI6R49ajFDNBNLLIqJTp5KtcQA=="],
154165 }
155166 }
packages/components/package.json+2−1
@@ -31,7 +31,8 @@
3131 ],
3232 "dependencies": {
3333 "@cel-tui/types": "workspace:*",
34- "@cel-tui/core": "workspace:*"
34+ "@cel-tui/core": "workspace:*",
35+ "yoctomarkdown": "^0.1.0"
3536 },
3637 "peerDependencies": {
3738 "typescript": ">=5.0.0"
packages/components/src/index.ts+0−1
@@ -29,7 +29,6 @@ export {
2929 export {
3030 Markdown,
3131 tokenize,
32- parseInline,
3332 type MarkdownProps,
3433 type MarkdownTheme,
3534 type BlockToken,
packages/components/src/markdown.test.ts+2−295
@@ -1,12 +1,6 @@
11 import { describe, test, expect } from "bun:test";
22 import type { ContainerNode, Node, TextNode } from "@cel-tui/types";
3-import {
4- parseInline,
5- tokenize,
6- Markdown,
7- type BlockToken,
8- type InlineSpan,
9-} from "./markdown";
3+import { Markdown } from "./markdown";
104
115 // ─── Helpers ────────────────────────────────────────────────────
126
@@ -28,299 +22,12 @@ function asContainer(node: Node): ContainerNode {
2822 return node as ContainerNode;
2923 }
3024
31-// ─── parseInline ────────────────────────────────────────────────
32-
33-describe("parseInline", () => {
34- test("plain text", () => {
35- expect(parseInline("hello world")).toEqual([
36- { type: "text", content: "hello world" },
37- ]);
38- });
39-
40- test("bold", () => {
41- expect(parseInline("some **bold** text")).toEqual([
42- { type: "text", content: "some " },
43- { type: "bold", content: "bold" },
44- { type: "text", content: " text" },
45- ]);
46- });
47-
48- test("italic", () => {
49- expect(parseInline("some *italic* text")).toEqual([
50- { type: "text", content: "some " },
51- { type: "italic", content: "italic" },
52- { type: "text", content: " text" },
53- ]);
54- });
55-
56- test("inline code", () => {
57- expect(parseInline("use `foo()` here")).toEqual([
58- { type: "text", content: "use " },
59- { type: "code", content: "foo()" },
60- { type: "text", content: " here" },
61- ]);
62- });
63-
64- test("link", () => {
65- expect(parseInline("see [docs](https://example.com) now")).toEqual([
66- { type: "text", content: "see " },
67- { type: "link", text: "docs", url: "https://example.com" },
68- { type: "text", content: " now" },
69- ]);
70- });
71-
72- test("mixed inline", () => {
73- const spans = parseInline("**bold** and *italic* and `code`");
74- expect(spans).toEqual([
75- { type: "bold", content: "bold" },
76- { type: "text", content: " and " },
77- { type: "italic", content: "italic" },
78- { type: "text", content: " and " },
79- { type: "code", content: "code" },
80- ]);
81- });
82-
83- test("unclosed bold is plain text", () => {
84- expect(parseInline("some **unclosed")).toEqual([
85- { type: "text", content: "some **unclosed" },
86- ]);
87- });
88-
89- test("unclosed italic is plain text", () => {
90- expect(parseInline("some *unclosed")).toEqual([
91- { type: "text", content: "some *unclosed" },
92- ]);
93- });
94-
95- test("unclosed code is plain text", () => {
96- expect(parseInline("some `unclosed")).toEqual([
97- { type: "text", content: "some `unclosed" },
98- ]);
99- });
100-
101- test("unclosed link is plain text", () => {
102- expect(parseInline("see [docs](no-close")).toEqual([
103- { type: "text", content: "see [docs](no-close" },
104- ]);
105- });
106-
107- test("empty string", () => {
108- expect(parseInline("")).toEqual([]);
109- });
110-
111- test("code has priority over bold", () => {
112- // The ` opens before ** can match
113- expect(parseInline("`**not bold**`")).toEqual([
114- { type: "code", content: "**not bold**" },
115- ]);
116- });
117-});
118-
119-// ─── tokenize ───────────────────────────────────────────────────
120-
121-describe("tokenize", () => {
122- test("heading levels", () => {
123- const tokens = tokenize("# H1\n## H2\n### H3");
124- expect(tokens).toEqual([
125- { type: "heading", depth: 1, spans: [{ type: "text", content: "H1" }] },
126- { type: "heading", depth: 2, spans: [{ type: "text", content: "H2" }] },
127- { type: "heading", depth: 3, spans: [{ type: "text", content: "H3" }] },
128- ]);
129- });
130-
131- test("heading with inline formatting", () => {
132- const tokens = tokenize("# Hello **world**");
133- expect(tokens[0]).toEqual({
134- type: "heading",
135- depth: 1,
136- spans: [
137- { type: "text", content: "Hello " },
138- { type: "bold", content: "world" },
139- ],
140- });
141- });
142-
143- test("paragraph", () => {
144- const tokens = tokenize("Hello world");
145- expect(tokens).toEqual([
146- { type: "paragraph", spans: [{ type: "text", content: "Hello world" }] },
147- ]);
148- });
149-
150- test("code block with lang", () => {
151- const tokens = tokenize("```js\nconst x = 1;\nconst y = 2;\n```");
152- expect(tokens).toEqual([
153- {
154- type: "code_block",
155- lang: "js",
156- content: "const x = 1;\nconst y = 2;",
157- },
158- ]);
159- });
160-
161- test("code block without lang", () => {
162- const tokens = tokenize("```\nsome code\n```");
163- expect(tokens).toEqual([
164- { type: "code_block", lang: "", content: "some code" },
165- ]);
166- });
167-
168- test("unclosed code block (streaming)", () => {
169- const tokens = tokenize("```js\nconst x = 1;");
170- expect(tokens).toEqual([
171- { type: "code_block", lang: "js", content: "const x = 1;" },
172- ]);
173- });
174-
175- test("unordered list", () => {
176- const tokens = tokenize("- first\n- second\n* third");
177- expect(tokens).toEqual([
178- {
179- type: "list_item",
180- ordered: false,
181- index: 0,
182- spans: [{ type: "text", content: "first" }],
183- },
184- {
185- type: "list_item",
186- ordered: false,
187- index: 0,
188- spans: [{ type: "text", content: "second" }],
189- },
190- {
191- type: "list_item",
192- ordered: false,
193- index: 0,
194- spans: [{ type: "text", content: "third" }],
195- },
196- ]);
197- });
198-
199- test("ordered list", () => {
200- const tokens = tokenize("1. first\n2. second");
201- expect(tokens).toEqual([
202- {
203- type: "list_item",
204- ordered: true,
205- index: 1,
206- spans: [{ type: "text", content: "first" }],
207- },
208- {
209- type: "list_item",
210- ordered: true,
211- index: 2,
212- spans: [{ type: "text", content: "second" }],
213- },
214- ]);
215- });
216-
217- test("blockquote", () => {
218- const tokens = tokenize("> some quote");
219- expect(tokens).toEqual([
220- {
221- type: "blockquote",
222- spans: [{ type: "text", content: "some quote" }],
223- },
224- ]);
225- });
226-
227- test("blockquote with inline formatting", () => {
228- const tokens = tokenize("> a **bold** quote");
229- expect(tokens[0]).toEqual({
230- type: "blockquote",
231- spans: [
232- { type: "text", content: "a " },
233- { type: "bold", content: "bold" },
234- { type: "text", content: " quote" },
235- ],
236- });
237- });
238-
239- test("horizontal rules", () => {
240- expect(tokenize("---")).toEqual([{ type: "hr" }]);
241- expect(tokenize("***")).toEqual([{ type: "hr" }]);
242- expect(tokenize("___")).toEqual([{ type: "hr" }]);
243- expect(tokenize("----")).toEqual([{ type: "hr" }]);
244- });
245-
246- test("blank lines", () => {
247- const tokens = tokenize("hello\n\nworld");
248- expect(tokens).toEqual([
249- { type: "paragraph", spans: [{ type: "text", content: "hello" }] },
250- { type: "blank" },
251- { type: "paragraph", spans: [{ type: "text", content: "world" }] },
252- ]);
253- });
254-
255- test("full document", () => {
256- const md = [
257- "# Title",
258- "",
259- "A paragraph with **bold**.",
260- "",
261- "```ts",
262- "const x = 1;",
263- "```",
264- "",
265- "- item one",
266- "- item two",
267- "",
268- "> a quote",
269- "",
270- "---",
271- ].join("\n");
272-
273- const tokens = tokenize(md);
274- const types = tokens.map((t) => t.type);
275- expect(types).toEqual([
276- "heading",
277- "blank",
278- "paragraph",
279- "blank",
280- "code_block",
281- "blank",
282- "list_item",
283- "list_item",
284- "blank",
285- "blockquote",
286- "blank",
287- "hr",
288- ]);
289- });
290-
291- test("empty content", () => {
292- expect(tokenize("")).toEqual([{ type: "blank" }]);
293- });
294-
295- test("code block preserves content verbatim", () => {
296- const tokens = tokenize("```\n indented\n**not bold**\n```");
297- const cb = tokens[0] as { type: "code_block"; content: string };
298- expect(cb.content).toBe(" indented\n**not bold**");
299- });
300-
301- test("list item with inline formatting", () => {
302- const tokens = tokenize("- some **bold** item");
303- expect(tokens[0]).toEqual({
304- type: "list_item",
305- ordered: false,
306- index: 0,
307- spans: [
308- { type: "text", content: "some " },
309- { type: "bold", content: "bold" },
310- { type: "text", content: " item" },
311- ],
312- });
313- });
314-});
315-
31625 // ─── Markdown component ─────────────────────────────────────────
31726
31827 describe("Markdown", () => {
31928 test("returns empty array for empty string", () => {
320- // Empty string tokenizes to one blank → one Text("")
32129 const nodes = Markdown("");
322- expect(nodes).toHaveLength(1);
323- expect(textContent(nodes[0]!)).toBe("");
30+ expect(nodes).toHaveLength(0);
32431 });
32532
32633 test("heading renders as styled Text", () => {
packages/components/src/markdown.ts+8−253
@@ -1,257 +1,11 @@
11 import type { Color, Node, StyleProps } from "@cel-tui/types";
22 import { VStack, HStack, Text } from "@cel-tui/core";
3+import { tokenize, type BlockToken, type InlineSpan } from "yoctomarkdown";
34 import { Divider } from "./divider.js";
45
5-// ─── Token Types ────────────────────────────────────────────────
6-// These mirror the token API that yoctomarkdown will expose after
7-// its ANSI-free refactor. Until then, we use a local tokenizer.
8-
9-/**
10- * An inline span within a block of markdown text.
11- *
12- * Represents a segment of text with a specific formatting type.
13- * A paragraph like `"Some **bold** and *italic* text"` is parsed
14- * into an array of spans:
15- * ```
16- * [
17- * { type: "text", content: "Some " },
18- * { type: "bold", content: "bold" },
19- * { type: "text", content: " and " },
20- * { type: "italic", content: "italic" },
21- * { type: "text", content: " text" },
22- * ]
23- * ```
24- */
25-export type InlineSpan =
26- | { type: "text"; content: string }
27- | { type: "bold"; content: string }
28- | { type: "italic"; content: string }
29- | { type: "code"; content: string }
30- | { type: "link"; text: string; url: string };
31-
32-/**
33- * A block-level markdown token.
34- *
35- * Each token represents one logical block in the document:
36- * a heading, paragraph, code block, list item, blockquote,
37- * horizontal rule, or blank line.
38- */
39-export type BlockToken =
40- | { type: "heading"; depth: 1 | 2 | 3; spans: InlineSpan[] }
41- | { type: "paragraph"; spans: InlineSpan[] }
42- | { type: "code_block"; lang: string; content: string }
43- | {
44- type: "list_item";
45- ordered: boolean;
46- index: number;
47- spans: InlineSpan[];
48- }
49- | { type: "blockquote"; spans: InlineSpan[] }
50- | { type: "hr" }
51- | { type: "blank" };
52-
53-// ─── Tokenizer ──────────────────────────────────────────────────
54-// Line-by-line parser matching yoctomarkdown's supported subset.
55-// Will be replaced by yoctomarkdown's token API once available.
56-
57-/**
58- * Parse inline formatting within a line of text.
59- *
60- * Recognizes: `` `code` ``, `**bold**`, `*italic*`, `[text](url)`.
61- * Unclosed constructs are emitted as plain text (safe for streaming).
62- *
63- * @param text - A single line of text (no newlines).
64- * @returns Array of inline spans.
65- */
66-export function parseInline(text: string): InlineSpan[] {
67- const spans: InlineSpan[] = [];
68- let i = 0;
69- let current = "";
70-
71- function flush(): void {
72- if (current.length > 0) {
73- spans.push({ type: "text", content: current });
74- current = "";
75- }
76- }
77-
78- while (i < text.length) {
79- // Inline code: `code`
80- if (text[i] === "`" && text[i + 1] !== "`") {
81- const end = text.indexOf("`", i + 1);
82- if (end !== -1) {
83- flush();
84- spans.push({ type: "code", content: text.slice(i + 1, end) });
85- i = end + 1;
86- continue;
87- }
88- }
89-
90- // Bold: **text**
91- if (text[i] === "*" && text[i + 1] === "*") {
92- const end = text.indexOf("**", i + 2);
93- if (end !== -1) {
94- flush();
95- spans.push({ type: "bold", content: text.slice(i + 2, end) });
96- i = end + 2;
97- continue;
98- }
99- }
100-
101- // Italic: *text* (not **)
102- if (text[i] === "*" && text[i + 1] !== "*") {
103- const end = text.indexOf("*", i + 1);
104- if (end !== -1 && text[end + 1] !== "*") {
105- flush();
106- spans.push({ type: "italic", content: text.slice(i + 1, end) });
107- i = end + 1;
108- continue;
109- }
110- }
111-
112- // Link: [text](url)
113- if (text[i] === "[") {
114- const bracketEnd = text.indexOf("]", i + 1);
115- if (bracketEnd !== -1 && text[bracketEnd + 1] === "(") {
116- const parenEnd = text.indexOf(")", bracketEnd + 2);
117- if (parenEnd !== -1) {
118- flush();
119- spans.push({
120- type: "link",
121- text: text.slice(i + 1, bracketEnd),
122- url: text.slice(bracketEnd + 2, parenEnd),
123- });
124- i = parenEnd + 1;
125- continue;
126- }
127- }
128- }
129-
130- current += text[i];
131- i++;
132- }
133-
134- flush();
135- return spans;
136-}
137-
138-/**
139- * Tokenize a markdown string into block-level tokens.
140- *
141- * Parses line-by-line, recognizing headings, code blocks, lists,
142- * blockquotes, horizontal rules, and paragraphs. Inline formatting
143- * within text blocks is parsed into {@link InlineSpan} arrays.
144- *
145- * Handles streaming gracefully: unclosed code blocks are emitted
146- * as `code_block` tokens, and unclosed inline formatting appears
147- * as plain text.
148- *
149- * @param content - Markdown string (may be partial during streaming).
150- * @returns Array of block tokens.
151- */
152-export function tokenize(content: string): BlockToken[] {
153- const tokens: BlockToken[] = [];
154- const lines = content.split("\n");
155- let inCodeBlock = false;
156- let codeBlockLang = "";
157- let codeBlockLines: string[] = [];
158-
159- for (const line of lines) {
160- if (inCodeBlock) {
161- if (line.trim().startsWith("```")) {
162- tokens.push({
163- type: "code_block",
164- lang: codeBlockLang,
165- content: codeBlockLines.join("\n"),
166- });
167- inCodeBlock = false;
168- codeBlockLang = "";
169- codeBlockLines = [];
170- continue;
171- }
172- codeBlockLines.push(line);
173- continue;
174- }
175-
176- const trimmed = line.trim();
177-
178- // Code block opening
179- if (trimmed.startsWith("```")) {
180- inCodeBlock = true;
181- codeBlockLang = trimmed.slice(3).trim();
182- continue;
183- }
184-
185- // Horizontal rule
186- if (/^(?:-{3,}|\*{3,}|_{3,})$/.test(trimmed)) {
187- tokens.push({ type: "hr" });
188- continue;
189- }
190-
191- // Heading
192- const headingMatch = line.match(/^(#{1,3})\s+(.*)$/);
193- if (headingMatch) {
194- const depth = headingMatch[1]!.length as 1 | 2 | 3;
195- tokens.push({
196- type: "heading",
197- depth,
198- spans: parseInline(headingMatch[2]!),
199- });
200- continue;
201- }
202-
203- // Blockquote
204- const bqMatch = line.match(/^>\s?(.*)$/);
205- if (bqMatch) {
206- tokens.push({ type: "blockquote", spans: parseInline(bqMatch[1]!) });
207- continue;
208- }
209-
210- // Unordered list
211- const ulMatch = line.match(/^[-*]\s+(.*)$/);
212- if (ulMatch) {
213- tokens.push({
214- type: "list_item",
215- ordered: false,
216- index: 0,
217- spans: parseInline(ulMatch[1]!),
218- });
219- continue;
220- }
221-
222- // Ordered list
223- const olMatch = line.match(/^(\d+)\.\s+(.*)$/);
224- if (olMatch) {
225- tokens.push({
226- type: "list_item",
227- ordered: true,
228- index: parseInt(olMatch[1]!, 10),
229- spans: parseInline(olMatch[2]!),
230- });
231- continue;
232- }
233-
234- // Blank line
235- if (trimmed === "") {
236- tokens.push({ type: "blank" });
237- continue;
238- }
239-
240- // Plain paragraph
241- tokens.push({ type: "paragraph", spans: parseInline(line) });
242- }
243-
244- // Unclosed code block — emit what we have (streaming case)
245- if (inCodeBlock) {
246- tokens.push({
247- type: "code_block",
248- lang: codeBlockLang,
249- content: codeBlockLines.join("\n"),
250- });
251- }
252-
253- return tokens;
254-}
6+// Re-export token types so consumers don't need a direct yoctomarkdown dep
7+export type { BlockToken, InlineSpan } from "yoctomarkdown";
8+export { tokenize } from "yoctomarkdown";
2559
25610 // ─── Theme ──────────────────────────────────────────────────────
25711
@@ -331,9 +85,10 @@ export interface MarkdownProps {
33185 /**
33286 * Render a markdown string as an array of cel-tui nodes.
33387 *
334- * Parses the content into block-level tokens and maps each to
335- * styled primitives. The returned array is meant to be used as
336- * children of a container (typically a scrollable VStack).
88+ * Parses the content into block-level tokens (via
89+ * [yoctomarkdown](https://www.npmjs.com/package/yoctomarkdown))
90+ * and maps each to styled primitives. The returned array is meant
91+ * to be used as children of a container (typically a scrollable VStack).
33792 *
33893 * **Block-level styling** is fully supported: headings, code blocks,
33994 * lists, blockquotes, and horizontal rules are rendered with distinct