summaryrefslogtreecommitdiff
path: root/ui/lib/markdown.js
Commit message (Collapse)AuthorAge
* tools/reformatOwen Jacobson2025-06-11
|
* Remove trailing spaceKit La Touche2025-04-22
|
* Add the following attributes to all markdown-generated links:Owen Jacobson2025-04-21
| | | | | | | | * `target="_blank"`: when Pilcrow is running in a browser, clicking a link should not replace Pilcrow with the target of the link. Pilcrow is "app-like" enough that opening links in a new tab _by default_, without user intervention, is likely more appropriate. * `rel="noreferrer"`, which (A) stops most UAs from setting a referrer header when following those links, and (B) also implies `noopener`, preventing the link target from using `window.opener` from reaching back into Pilcrow's DOM. I briefly experimented with DOMPurify's `RETURN_DOM_FRAGMENT` mode, which would have made the tests somewhat easier to write, but I wasn't able to find a good way to integrate the returned `DocumentFragment` objects with Svelte components, so HTML-as-strings it is. Sigh.
* Split Markdown rendering out into its own JS module.Owen Jacobson2025-02-25