how to disable the "autolink-literal" behavior of remark-gfm (but keep the rest)
#2663
-
|
is it possible to disable just the "autolink literal" behavior of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
import { gfmFootnoteFromMarkdown, gfmFootnoteToMarkdown } from 'mdast-util-gfm-footnote'
import { gfmStrikethroughFromMarkdown, gfmStrikethroughToMarkdown } from 'mdast-util-gfm-strikethrough'
import { gfmTableFromMarkdown, gfmTableToMarkdown } from 'mdast-util-gfm-table'
import { gfmTaskListItemFromMarkdown, gfmTaskListItemToMarkdown } from 'mdast-util-gfm-task-list-item'
import { gfmFootnote } from 'micromark-extension-gfm-footnote'
import { gfmStrikethrough } from 'micromark-extension-gfm-strikethrough'
import { gfmTable } from 'micromark-extension-gfm-table'
import { gfmTaskListItem } from 'micromark-extension-gfm-task-list-item'
export function remarkCustomGfm() {
const data = this.data()
data.micromarkExtensions ||= []
data.fromMarkdownExtensions ||= []
data.toMarkdownExtensions ||= []
data.micromarkExtensions.push(
gfmFootnote(),
gfmStrikethrough(),
gfmTable(),
gfmTaskListItem()
)
data.fromMarkdownExtensions.push(
gfmFootnoteFromMarkdown(),
gfmStrikethroughFromMarkdown(),
gfmTableFromMarkdown(),
gfmTaskListItemFromMarkdown()
)
data.toMarkdownExtensions.push(
gfmFootnoteToMarkdown(),
gfmStrikethroughToMarkdown(),
gfmTableToMarkdown(),
gfmTaskListItemToMarkdown()
)
} |
Beta Was this translation helpful? Give feedback.
-
|
it is indeed very much possible, but I don’t recommend picking and choosing for most folks, so I don’t want to make that too easy! While there are significant drawbacks to this particular (sub)extension, I think markdown will be in a worse place if everyone picks and chooses flavors! |
Beta Was this translation helpful? Give feedback.
remark-gfmusesmicromark-extension-gfmandmdast-util-gfm. As you can see from the source code, they combine various extensions. You can cherry-pick those yourself. I.e. something like: