如何禁用谷歌代码美化的代码突出显示?

时间:2013-12-26 23:35:28

标签: syntax-highlighting pretty-print google-code-prettify

是否可以在pre标签中添加一个类来禁用代码突出显示?我尝试添加类prettyprint-false和no-prettyprint。 https://code.google.com/p/google-code-prettify/wiki/GettingStarted

1 个答案:

答案 0 :(得分:3)

<pre class="prettyprint prettyprinted">

或者在漂亮的印刷版块中,将其添加到您不想要美化的部分:

<span class="nocode"> ... </span>

带有“nocode”部分的漂亮打印块的示例:

<pre class="prettyprint">
   select blah
   from   blahblah
   where  blahblahblah;

   <span class="nocode">
   BLAH
   ------------
   Various results
   of clever query

   2 rows selected.
   </span>
</pre>