如何将类属性及其值传递给Markdown语法
我在我的Django项目中使用Python的Markdown,当我有这个值时
#/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>
现在我的问题是,如何把类属性和它的值传递给代码元素。
举个例子:
#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>
这可能吗?怎么做呢?