@nuxtjs/markdownit not parsing HTML tags

adamkhan
0
adamkhan
commented a year ago

Version

1.2.3

Reproduction link

https://codesandbox.io/s/l780y229q7?fontsize=14

Steps to reproduce

Install @nuxtjs/markdownit, follow the instructions to inject text as laid out in its README, and include some HTML in the markdowned text.

What is expected ?

Markdownit will parse HTML.

What is actually happening?

HTML tags are rendered literalIy, at least, the ones I have in my text, namely span and cite.

bug
0
mthelm85
0
mthelm85
commented a year ago

Hi Adam,

I ran into this same issue and resolved it by including html: true in my markdownit options object (in nuxt.config.js):

  markdownit: {
    injected: true,
    html: true,
    use: [ 'markdown-it-highlightjs' ]
  },

Hope this solves your problem.

Matt

0
adamkhan
0
adamkhan
commented a year ago

Hi Matt, Yes it did, thanks for chiming in!

If anybody else is reading this, my specific site doesn't need code so Mark's use: [ 'markdown-it-highlightjs' ] line can be omitted.

t might be worth mentioning at @nuxtjs/markdownit that the https://github.com/markdown-it/markdown-it docs list all the parameters.

0
Informations
Bug Report โ€ข Open
#c155 - Created a year ago