-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
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
Update USING_PRO.md #3492
Update USING_PRO.md #3492
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I think this might be better to add to marked.use documentation since this is not only for |
OK. I changed to Marked part. |
docs/USING_ADVANCED.md
Outdated
@@ -13,6 +13,31 @@ const marked = new Marked([options, extension, ...]); | |||
|:--------|:-------|:----------------------------------------------------------------------| | |||
| options |`object`|The same arguments that can be passed to [`marked.use`](/using_pro#use)| | |||
|
|||
Another case is, if you want to rerun function everytime they open a file, or you want to make marked.run() non-state, you can create a new instance of Marked to ensure options and extensions are locally scoped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem like this is saying anything more than the documentation above. That the user should use Marked instance if they want extensions to be locally scoped.
I think the example should emphasize that marked.use(...)
should not be used in a loop or function. It should only be used directly after new Marked
is created or marked
is imported
OK. I changed to a note. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 💯
Add document about #3487