fix: vendor marked UMD build so window.marked is defined (issue #244)
This commit is contained in:
parent
b283768f26
commit
9b9277db78
5 changed files with 2928 additions and 16 deletions
|
|
@ -32,11 +32,16 @@
|
|||
pub const BASE_CSS: &str = include_str!("../assets/base.css");
|
||||
pub const TERMINAL_CSS: &str = include_str!("../assets/terminal.css");
|
||||
pub const TERMINAL_JS: &str = include_str!("../assets/terminal.js");
|
||||
/// Vendored [marked](https://github.com/markedjs/marked) v4.0.2 UMD bundle.
|
||||
/// Exposes a global `marked` with `.parse(src, opts)` returning HTML. Used
|
||||
/// by the per-agent terminal to render message bodies (`send` / `recv` /
|
||||
/// `ask` / `answer` / assistant text) with basic markdown — paragraphs,
|
||||
/// lists, fenced + inline code, bold/italic, links. Vendored rather than
|
||||
/// CDN-loaded so the per-agent page works on operator machines without
|
||||
/// internet egress (the container itself never fetches it).
|
||||
pub const MARKED_JS: &str = include_str!("../assets/marked.min.js");
|
||||
/// Vendored [marked](https://github.com/markedjs/marked) v4.0.2 **UMD**
|
||||
/// bundle (`lib/marked.umd.js`). The UMD wrapper assigns a browser global
|
||||
/// `window.marked` with `.parse(src, opts)` / `.setOptions(...)`. Used by
|
||||
/// the per-agent terminal and the dashboard file-preview flyout to render
|
||||
/// markdown (paragraphs, lists, fenced + inline code, bold/italic, links).
|
||||
/// Vendored rather than CDN-loaded so the pages work on operator machines
|
||||
/// without internet egress (the container itself never fetches it).
|
||||
///
|
||||
/// NB: must be the **UMD** build, not `marked.min.js` / `lib/marked.cjs` —
|
||||
/// those are CommonJS (`exports.parse = …`, no wrapper) and throw
|
||||
/// `exports is not defined` in a `<script>` tag, leaving `window.marked`
|
||||
/// undefined and markdown silently falling back to raw text (issue #244).
|
||||
pub const MARKED_JS: &str = include_str!("../assets/marked.umd.js");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue