-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
pr-welcomePull Request to resolve this issue greatly welcomedPull Request to resolve this issue greatly welcomed
Description
Please thumbs up 👍 this comment if you would like to use this feature, or thumbs down 👎 if you don't think it should be added . Your feedback is valued
scoped option wraps the contents in a <div class="rich-text">${contents}</div> when true, but defaults to false. scoped also accepts a string that will be used as the class for the wrapping div (rich-text by default).
This can already be accomplished by using a @metalsmith/layouts layout but it's a nice extra to have it as a built-in plugin option. CSS rules can be easily scoped to .rich-text * { ... }
Usage example:
metalsmith.use(markdown({ scoped: true }))
metalsmith.use(markdown({ scoped: 'rich-text' }))
// both render a file '*Hello _world_*' as '<div class="rich-text"><strong>Hello <em>world</em></strong></div>'Readme must be updated, test added
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
pr-welcomePull Request to resolve this issue greatly welcomedPull Request to resolve this issue greatly welcomed