Skip to content

Commit

Permalink
docs(tokenizer): utilise escapeHTML() (#222)
Browse files Browse the repository at this point in the history
- marked internal escape() is no longer exported
- continue #214
  • Loading branch information
curbengh committed Mar 2, 2022
1 parent 4304601 commit 43db794
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ dompurify: true
Or you can enable specific DOMPurify options (but according to DOMPurify authors, the default options are safe):

```yml
dompurify:
dompurify:
FORBID_TAGS:
- "style"
```
Expand Down Expand Up @@ -195,7 +195,7 @@ Notice `renderer.heading = function (text, level) {` corresponds to [this line](
It is also possible to customize the [tokenizer](https://marked.js.org/using_pro#tokenizer).

``` js
const { escape } = require('marked/src/helpers');
const { escapeHTML: escape } = require('hexo-util');

// https://github.com/markedjs/marked/blob/b6773fca412c339e0cedd56b63f9fa1583cfd372/src/Lexer.js#L8-L24
// Replace dashes only
Expand Down

0 comments on commit 43db794

Please sign in to comment.