-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Decouple linkify in separate plugin #351
Conversation
Closes #343 linkify depends on autolinker which is quite heavy. The option is disabled by default and not used most of the time. https://bundlephobia.com/result?p=autolinker@3.1.0 In this diff I decoupled linkify into plugin which can be accessed like this ```js import Remarkable from 'remarkable'; import linkify from 'remarkable/linkify'; const md = new Remarkable({ html: true }) .use(linkify); ``` For UMD build linkify provided out of the box ```js const md = new window.Remarkable({ html: true }) .use(window.Remarkable.linkify); ```
5b1cb57
to
d887353
Compare
1 similar comment
@jonschlinkert @doowb @shockey are you okay with this change? |
I like the change, it looks great! I'm assuming the reason for doing it this way is because it gives bundlers a chance to tree shake and exclude I think this change should wait until a major version bump is ready. Even though the default for |
I can add warning that linkify option is replaced with plugin. Major bump is almost ready (at least from my POV). This PR is a blocker for #350. |
In #350 you mentioned: If you're saying that all of the other stuff would require a major bump, then I'm fine with this PR being merged now. Especially because I'm excited to see all the work you've been doing get released 😀 , but I'm still wary about breaking changes in a patch bump. If you have a plan for the releases, I'm good with that and I'll approve my review. |
I think removed bower support is a breaking change so we cannot publish 1.7.2. |
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.
Looks good to me as a major version bump
Closes #343
linkify depends on autolinker which is quite heavy. The option is
disabled by default and not used most of the time.
https://bundlephobia.com/result?p=autolinker@3.1.0
In this diff I decoupled linkify into plugin which can be accessed like
this
For UMD build linkify provided out of the box