本文介绍了如何将类属性和值传递给markdown语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我拥有值时,我正在为我的django项目使用python markdown
Im using python markdown for my django project, when i have the value
#/usr/bin/env python
print "this is converted to html code block"
输出为
<pre><code>
#/usr/bin/env python
print "this is converted to html code block"
</code><pre>
现在我的问题是我如何才能将类的属性和值传递给代码elem.样本:
Now my question is that how can i pass class attribute and value to code elem.Sample:
#i should be using some markdown syntax below
[class="python"]
#/usr/bin/env python
print "this is converted to html code block"
然后是这里的输出
<pre><code class="python">
#/usr/bin/env python
print "this is converted to html code block"
</code><pre>
有可能吗?以及如何?
推荐答案
您可以在Markdown中编写HTML,但不能添加类和ID之类的东西.
You can write HTML in Markdown, but you can't add things like classes and ids.
请参见此问题或此问题.
这篇关于如何将类属性和值传递给markdown语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!