fn
parseTextSlice
Parse plain text: one block per line, blank lines dropped, ``` fences folded into a code block, and each line's leading marker resolved through the registry's input rules — so a markdown file pastes as headings, lists and quotes. A single line with no marker is inline: it joins the caret's line rather than splitting it.
Signature
ts
export function parseTextSlice(text: string, registry: Registry): Slice{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | — |
registry | Registry | — |
Returns
Slice| Property | Type | Description |
|---|---|---|
blocks | readonly Node[] | — |
openStart | boolean | The first block's runs continue the block the caret is in — no boundary before them. |
openEnd | boolean | The last block stays open: the caret lands inside it and the tail of the split block joins it. |