Update readme
This commit is contained in:
@@ -3,9 +3,9 @@
|
|||||||
Utilities for parsing note content.
|
Utilities for parsing note content.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {truncate, parse, render} from '@welshman/content'
|
import {parse, render} from '@welshman/content'
|
||||||
|
|
||||||
const content = "Hello<br>from https://coracle.tools! <script>alert('evil')</script>"
|
const content = "Hello<br>from https://coracle.tools! <script>alert('evil')</script>"
|
||||||
const html = truncate(parse({content})).map(render).join("")
|
const html = parse({content}).map(render).join("")
|
||||||
// =>
|
// => Hello<br>from <a href="https://coracle.tools/" target="_blank">coracle.tools/</a>! <script>alert('evil')</script>
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user