-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes GH-29. Previously, plugins could be added multiple times. This behaviour is kind-of funky, no matter how it’s dealt with. The best way to deal with it though, I think, is by merging the configuration for those double attached plugins and only invoking the plugin once. With the merged config. This problem will become more apparent due to presets. Take the following code: ```js unified().use(toc, {maxDepth: 2}).use(toc, {tight: true}) ``` ...this is now handled the same as: ```js unified().use(toc, {maxDepth: 2, tight: true}) ``` Additionally, this renames `abstract` to `freeze`, to better signal what it represents. Finally, plugins are no longer invoked when (first) used. Instead, they are called upon when actually used (when the processor is frozen, either explicitly through `freeze()` or implicitly when first `parse`, `stringify`, `run`, or `process` is called).
- Loading branch information
Showing
8 changed files
with
541 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.