@@ -550,7 +550,8 @@ or removing a command fails until the table changes in the same commit.
550550| ` processLifecycle.resolve ` | Decide how each process or resource of one Lithe instance ends |
551551| ` processLifecycle.inventory ` | Group a process snapshot of one Lithe instance into terminals, Agent tasks and background services |
552552| ` processLifecycle.settle ` | Turn confirmation answers into what ends, what is kept and the updated settings |
553- | ` markdown.render ` | Render and sanitizes shared Markdown |
553+ | ` markdown.render ` | Renders and sanitizes shared Markdown |
554+ | ` markdown.resolveReference ` | Decides what a link or an image of a rendered Markdown document points at |
554555| ` keymap.parseContext ` | Compile a bounded boolean shortcut context (from ` lithe-core-rules ` ) |
555556| ` keymap.evaluateContext ` | Evaluate a precompiled shortcut context (from ` lithe-core-rules ` ) |
556557| ` keymap.analyzeConflicts ` | Find conflicts among the final layered shortcut bindings (from ` lithe-core-rules ` ) |
@@ -5496,11 +5497,50 @@ embedding. Inline `<svg>` keeps its drawing elements (shapes, text, `use`,
54965497primitives) with their geometry and presentation attributes; ` script ` ,
54975498` foreignObject ` , ` style ` , the animation elements, ` feImage ` and the ` style `
54985499attribute are removed, and ` use ` /` textPath ` may only reference ` #id ` in the
5499- same document. Windows asynchronously requests this existing command via its
5500- central dispatcher, discards obsolete responses and falls back to the sanitized
5501- fragment if syntax coloring fails. Render failures are shown as localized text;
5502- there is no frontend Markdown parser fallback. This does not promise Windows
5503- math or diagram rendering parity.
5500+ same document. Frontends request the command off their window thread, discard
5501+ responses to an older revision of the source and show the sanitized fragment
5502+ unchanged if syntax coloring, math or diagram rendering fails. Render failures
5503+ are shown as localized text; there is no frontend Markdown parser fallback.
5504+
5505+ ` markdown.resolveReference ` decides what one link destination or image ` src ` of
5506+ a rendered document points at, so every preview follows and loads the same
5507+ things. It accepts:
5508+
5509+ ``` json
5510+ {
5511+ "documentPath" : " /workspace/docs/guide.md" ,
5512+ "workspaceRoot" : " /workspace" ,
5513+ "reference" : " ../assets/logo.svg?v=2" ,
5514+ "purpose" : " resource"
5515+ }
5516+ ```
5517+
5518+ ` workspaceRoot ` is optional. A document inside it has the workspace as its
5519+ scope; without it, or for a document outside it, the scope is the document's
5520+ folder. ` reference ` is the attribute exactly as the HTML holds it. ` purpose ` is
5521+ ` link ` for a click and ` resource ` for an image the page loads. The response is
5522+ tagged by ` kind ` :
5523+
5524+ | kind | purpose | fields | meaning |
5525+ | --- | --- | --- | --- |
5526+ | ` external ` | link | ` url ` | An http, https or mailto address for the system's browser or mail client |
5527+ | ` remote ` | resource | ` url ` | An http or https address with a host; the frontend downloads it under its proxy policy |
5528+ | ` anchor ` | link | ` anchor ` | A ` #fragment ` of the document, without ` # ` and percent-decoded |
5529+ | ` file ` | both | ` path ` , ` mime ` for a resource | A file of the machine |
5530+ | ` none ` | both | — | Nothing is followed or loaded |
5531+
5532+ Addresses come back normalized as a browser reads them, and a scheme-relative
5533+ ` //host ` address gets ` https: ` . Any other scheme, including ` file: ` , ` data: ` ,
5534+ ` javascript: ` and a one-letter Windows drive, is ` none ` . A path drops its query
5535+ and fragment and is percent-decoded; ` /path ` starts at the scope's root and any
5536+ other path at the document's folder, with ` . ` and ` .. ` resolved lexically. A
5537+ link's ` file ` is that lexical path, which need not exist. A resource's ` file `
5538+ must stay inside the scope both lexically and after Core resolves symbolic
5539+ links, must be an existing regular file, and must have an image extension
5540+ (` apng ` , ` avif ` , ` bmp ` , ` gif ` , ` ico ` , ` jpeg ` , ` jpg ` , ` png ` , ` svg ` , ` webp ` ); its
5541+ ` path ` is canonical and ` mime ` names the type. Otherwise the resource is
5542+ ` none ` . Frontends read a resource file without following another link and do not
5543+ load what this command refuses.
55045544
55055545Shared examples: ` rust/fixtures/editor/markdown-render-v1.json ` ,
55065546` markdown-html-v1.json ` and ` markdown-rich-content-v1.json ` .
0 commit comments