NuxtN
Nuxt2y ago
2 replies
erztemplerobba

nuxt/content markdownParser change local options

I use
import markdownParser from '@nuxt/content/transformers/markdown' to parse the markdown
like this:
  const parseMessage = async (message) => {
  const parsedContent = await markdownParser.parse(null, message.content)
  return { ...message, parsedContent }
}


It works well but automatically replaces markdown headings like ### Heading with links+anchortags like this:
<h3 id="test"><a href="#test"><strong>test:</strong></a></h3>


I want to keep 'normal' header tags without links etc. so I'm looking for an option to change this behavior in my component. If possible, I don't want to disable this functionality globally in my nuxt config because I might need it later in a blog component.
Was this page helpful?