docs: Info to install @types/marked for ts projects (#2577)

pull/2580/head
azmy60 2022-09-12 20:15:41 +07:00 committed by GitHub
parent d1523c8541
commit 0dcda393dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,7 @@ npm install -g marked
```sh
npm install marked
npm install @types/marked # For TypeScript projects
```
## Usage

View File

@ -21,8 +21,11 @@ These documentation pages are also rendered using marked 💯
**CLI:** `npm install -g marked`
**In-browser:** `npm install marked`
**In-browser:**
```
npm install marked
npm install @types/marked # For TypeScript projects
```
<h2 id="usage">Usage</h2>
### Warning: 🚨 Marked does not [sanitize](/using_advanced#options) the output HTML. If you are processing potentially unsafe strings, it's important to filter for possible XSS attacks. Some filtering options include [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [js-xss](https://github.com/leizongmin/js-xss), [sanitize-html](https://github.com/apostrophecms/sanitize-html) and [insane](https://github.com/bevacqua/insane) on the *output* HTML! 🚨