How to create a showdown.js markdown extension

后端 未结 2 1926
孤城傲影
孤城傲影 2021-01-14 17:35

Using the following code, I get working output:


  
    

        
2条回答
  •  野的像风
    2021-01-14 17:51

    In your last block you have a comma after 'lang', followed immediately with a function. This is not valid json.

    EDIT

    It appears that the readme was incorrect. I had to to pass an array with the string 'twitter'.

    var converter = new Showdown.converter({extensions: ['twitter']});
    converter.makeHtml('whatever @meandave2020');
    // output "

    whatever @meandave2020

    "

    I submitted a pull request to update this.

提交回复
热议问题