棱镜内的超链接,代码标签
Hyperlink within prism, code tag
我的 html 模板中有以下内容:
<pre>
<code class="language-markup">
{% filter force_escape %}
<Item>
<MarkUp><a href="http://google.com">Google</a></MarkUp>
<Normal>Hello</Normal>
</Item>
{% endfilter %}
</code>
</pre>
我希望它标记语言(为此我正在使用 prism),但也希望它为 "Google" 项目标记 hyperlink。
它应该是这样的:
点击 "Google" 将打开 link。
但这是目前的样子:
此外,"Google" 一词不可点击 -- <code>
标签内的任何内容都未被 link 编辑。
我如何使用棱镜完成上述操作?
Prism 似乎有一个专门用于此的插件。您可以在这里下载:http://prismjs.com/plugins/autolinker/。您可以使用这种格式:
[Text you want to see](http://url-goes-here.com)
我的 html 模板中有以下内容:
<pre>
<code class="language-markup">
{% filter force_escape %}
<Item>
<MarkUp><a href="http://google.com">Google</a></MarkUp>
<Normal>Hello</Normal>
</Item>
{% endfilter %}
</code>
</pre>
我希望它标记语言(为此我正在使用 prism),但也希望它为 "Google" 项目标记 hyperlink。
它应该是这样的:
点击 "Google" 将打开 link。
但这是目前的样子:
此外,"Google" 一词不可点击 -- <code>
标签内的任何内容都未被 link 编辑。
我如何使用棱镜完成上述操作?
Prism 似乎有一个专门用于此的插件。您可以在这里下载:http://prismjs.com/plugins/autolinker/。您可以使用这种格式:
[Text you want to see](http://url-goes-here.com)