Closed as not planned
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Problem
While some options are exposed to consumers, none of them allow controlling specific parts of GFM. e.g. if I want the entire suite besides Autolink Literals support, I have to fork this package (which is not very big, but still) and have something like this:
export function gfmFromMarkdown({ autolinkLiteral = true }: { autolinkLiteral?: boolean }) {
return [
autolinkLiteral && gfmAutolinkLiteralFromMarkdown(),
gfmFootnoteFromMarkdown(),
gfmStrikethroughFromMarkdown(),
gfmTableFromMarkdown(),
gfmTaskListItemFromMarkdown()
].filter(Boolean);
}
export function gfmToMarkdown({ autolinkLiteral = true, ...options }) {
return {
extensions: [
autolinkLiteral && gfmAutolinkLiteralToMarkdown(),
gfmFootnoteToMarkdown(options),
gfmStrikethroughToMarkdown(),
gfmTableToMarkdown(options),
gfmTaskListItemToMarkdown()
].filter(Boolean);
}
}
To allow this behavior. The same goes for any of the other plugins - table, list items, etc..
It would be nice if we could disable some of them via a simple boolean flag as suggested above.
Current solutions
Fork/patch the package to support this
Proposed solutions
Add an opt-out option from any of the plugins.