Files
welshman/packages/content
2024-09-06 16:09:46 -07:00
..
2024-06-03 15:05:37 -07:00
2024-09-06 16:09:46 -07:00
2024-06-11 12:50:55 -07:00
2024-06-03 15:05:37 -07:00
2024-06-03 15:05:37 -07:00

@welshman/content version

Utilities for parsing note content.

import {parse, render} from '@welshman/content'

const content = "Hello<br>from https://coracle.tools! <script>alert('evil')</script>"
const html = parse({content}).map(render).join("")
// => Hello&lt;br&gt;from <a href="https://coracle.tools/" target="_blank">coracle.tools/</a>! &lt;script&gt;alert('evil')&lt;/script&gt;