From f6bb586435418ef954f77ddfee18d4cb0c0b4781 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 10 Jun 2020 18:41:27 +0200 Subject: [PATCH] feat: rehype plugins (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: handle rehype plugins with recursive merging BREAKING CHANGE: plugins disappear in favor of remarkPlugins and rehypePlugins. basePlugins also disappear in favor of deep merging and functions override * docs: update for rehype plugins * feat(lib): improve plugins parser * docs: fix code-group component * docs: update for new plugins options * docs: add changelog page * feat(lib): use nuxt resolver for local plugins * docs: update configuration * feat(lib): remove nuxt dependency * docs: minor improvements * chore: add getOptions for programmatic usage * fix(lib): add missing property after merge * chore(lib): improve plugins parsing * test: options merging Co-authored-by: Sébastien Chopin --- docs/components/bases/CodeGroup.vue | 10 +- docs/content/en/advanced.md | 2 +- docs/content/en/changelog.md | 21 ++++ docs/content/en/configuration.md | 156 ++++++++++++++++++++++------ docs/content/en/writing.md | 8 +- lib/index.js | 59 ++++------- lib/parsers/markdown/index.js | 32 ++---- lib/utils.js | 90 ++++++++++++++++ test/options.test.js | 143 +++++++++++++++++++++++++ 9 files changed, 423 insertions(+), 98 deletions(-) create mode 100644 docs/content/en/changelog.md create mode 100644 lib/utils.js create mode 100644 test/options.test.js diff --git a/docs/components/bases/CodeGroup.vue b/docs/components/bases/CodeGroup.vue index 4ae285a35..3ed036c5a 100644 --- a/docs/components/bases/CodeGroup.vue +++ b/docs/components/bases/CodeGroup.vue @@ -1,6 +1,6 @@