0
我想使用google-code-prettify来突出显示某些代码的语法,但浏览器正在渲染包含在标记中的HTML。我遵循了入门指南谷歌代码美化与HTML冲突
例如,
<pre class="prettyprint">
<head>
<link href="stylesheet.css" rel="stylesheet">
</head>
<body>
<div id="divId">
<h1 class="h1Class">Hello world</h1>
</div>
</body>
</pre>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
在这里,我得到的只是Hello world
。我试过在class="prettyprint
之后加lang-html
,没有工作。
我错过了什么?
@mason固定和编辑,但仍无法正常工作与
<
和
>
更换<
。是的,这是代码 – propster 2015-03-02 19:50:05