We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
marked@5 deprecated some options.
safe-marked approach is a wrapper of marked. However, marked limit the this approach. In the future, safe-marked user can not extends marked.
marked
safe-marked
// ugly approach import { createMarkdown } from "safe-marked"; const markdown = createMarkdown({ marked: (marked) => { // extends marked marked.use(someExtension); return { // options } } }); const html = markdown(`# Header This is [CommonMark](https://commonmark.org/) text. `); console.log(html);
So, We need to move this sanitizer function to marked extension like markedSanitizer
markedSanitizer
e.g.
import { marked } from "marked"; import { markedSanitizer } from "marked-sanitizer"; marked.use(markedSanitizer());
As a result, we will deprecate safe-marked.
If you have any opinions, please feel free to write to us.
The text was updated successfully, but these errors were encountered:
I'm a bit confused by this PR - what do we need to do to migrate safe-marked to marked?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
marked@5 deprecated some options.
safe-marked approach is a wrapper of
marked
.However, marked limit the this approach.
In the future,
safe-marked
user can not extends marked.It is possible to continue using the WRAPPER approach, but it will be dirty code.
So, We need to move this sanitizer function to marked extension like
markedSanitizer
e.g.
As a result, we will deprecate
safe-marked
.TODO
safe-marked
and recommened to use the extensionIf you have any opinions, please feel free to write to us.
The text was updated successfully, but these errors were encountered: