在markdown中嵌入javascript [英] Embed javascript in markdown

查看:2155
本文介绍了在markdown中嵌入javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Maruku降价处理器。我喜欢这个

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

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

<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script>
...do stuff...
</script>

但是当我用大量错误渲染它时它会抱怨。第一个是

but it complains when I render it with a multitude of errors. The first one being

 ___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| Could you please format this better?
| I see that "<script type='text/javascript'>" is left after the raw HTML.
| At line 31
|   raw_html     |<script src='http://code.jquery.com/jquery-1.4.2.min.js' /><script type='text/javascript'>|
|       text --> |//<![CDATA[|

然后剩下的就好像解析器一样疯狂。然后它将javascript渲染到页面上的div中。我已经尝试将它作为CDATA块和jquery与我的脚本之间的额外间距。

and then the rest seems like the parser is going nuts. Then it renders the javascript into a div on the page. I've tried making it a CDATA block and extra spacing between the jquery and my script.

帮助?

推荐答案

我遇到了同样的问题,但我设法通过在开始标记之后添加换行符来让JavaScript出现在我的代码中。

I had this same problem, but I managed to get JavaScript to appear in my code by putting a newline after the opening tag.

这篇关于在markdown中嵌入javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆