Skip to content

Commit

Permalink
fix: remove marked deprecation warning
Browse files Browse the repository at this point in the history
This commit disables to flags that are deprecated in the 'marked-terminal' as
pointed in the following issue.

markedjs/marked#2793

```
marked(): mangle parameter is enabled by default, but is deprecated since
version 5.0.0, and will be removed in the future. To clear this warning, install
https://www.npmjs.com/package/marked-mangle, or disable by setting
`{mangle: false}`.

marked(): headerIds and headerPrefix parameters enabled by default, but are
deprecated since version 5.0.0, and will be removed in the future. To clear this
warning, install  https://www.npmjs.com/package/marked-gfm-heading-id, or
disable by setting `{headerIds: false}`.
```
  • Loading branch information
diogokiss committed Sep 4, 2023
1 parent 330006a commit 03fd591
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ async function terminalOutput(text) {
if (!markedOptionsSet) {
const { default: TerminalRenderer } = await import("marked-terminal"); // eslint-disable-line node/no-unsupported-features/es-syntax
marked.setOptions({ renderer: new TerminalRenderer() });
marked.use({
mangle: false,
headerIds: false,
});
markedOptionsSet = true;
}

Expand Down

0 comments on commit 03fd591

Please sign in to comment.