Embed javascript in markdown

后端 未结 11 2556
[愿得一人]
[愿得一人] 2020-12-13 02:23

I\'m using the Maruku markdown processor. I\'d like this

*blah* blah \"blah\" in [markdown](blah)



        
11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 02:50

    To my experience, markdown will outpus javascript text as plain text as long as you remove the code formatting that may confuse markdown.

    1. remove comments from javascript, as /* ... */ is translated to < em>
    2. remove the space indent in the front of each line. < p> may be inserted according to your indentation.

    Basically what I do is to review the generated html and find out what extra tags are inserted in between my javascript code by markdown. And remove the formatting that generates the extra tag.

提交回复
热议问题