-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
fix(markdown): allow plugin with array type option #2114
Conversation
β Deploy Preview for nuxt-content canceled.
|
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 for the PR @maximepvrt
Do you mind adding a simple test for it?
Co-authored-by: Farnabaz <[email protected]>
@farnabaz What test would you like me to add? Adding a plugin with a configuration of type 'array' in this file: https://github.com/nuxt/content/blob/main/test/fixtures/basic/nuxt.config.ts ? (for example rehype-wrap-all ?) |
Yes using |
@farnabaz Ready to merge. Looks good to me. π |
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 β€οΈ
π Linked issue
β Type of change
π Description
The current implementation of the markdown plugins 'rehype' and 'remark' transforme the option array into object. When providing an array, such as
[{selector: 'ol', wrapper: 'p' }, {selector: 'ul', wrapper: 'p' }]
, it is transformed into an object with numeric keys instead of maintaining the original array structure.π Checklist