mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 08:37:25 +02:00
fix(validation): allow non-object params to remark/rehype plugins (#6977)
Remark and Rehype plugins allow having options as a non-object type, such as a string. For instance, the official MDX docs even have an example of this: See https://mdxjs.com/docs/extending-mdx/#using-plugins The official plugin `remarkjs/remark-frontmatter` allows passing a string, e.g. `"toml"` as the options arg, instead of an object.
This commit is contained in:
parent
4b3f568b78
commit
4d2ab826b8
3 changed files with 5 additions and 6 deletions
|
@ -19,7 +19,7 @@ export const PluginIdSchema = Joi.string()
|
|||
|
||||
const MarkdownPluginsSchema = Joi.array()
|
||||
.items(
|
||||
Joi.array().ordered(Joi.function().required(), Joi.object().required()),
|
||||
Joi.array().ordered(Joi.function().required(), Joi.any().required()),
|
||||
Joi.function(),
|
||||
Joi.object(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue