Prism HTML highlighter

后端 未结 6 1247
陌清茗
陌清茗 2020-12-16 11:50

I\'m using Prism and its working well for CSS:

p { color: red }

but

6条回答
  •  眼角桃花
    2020-12-16 12:34

    To solve issue 1):

    You can use the unexcaped-markup plugin

    This is how it works:

    
    

    To ignore first and last returns I would recommend using the normalize whitespace plugin.

    To solve issue 2):

    There exists no languages-html see http://prismjs.com/index.html#languages-list. HTML is a HyperTextMarkupLanguage so its included in language-markup. Thats what you have to use.

提交回复
热议问题