我将 Jekyll 与 kramdown 和 pygments 一起使用,它适用于 javascript 或 python 代码,但是当我创建 php 时,如:
{% highlight php %}
header('Content-Type: application/json');
echo json_encode(array(
'jsonrpc' => "2.0",
'result' => $result,
'id' => $request->id,
'error' => null
));
{% endhighlight %}
每一行都是一个跨度,有x
类:
<code class="language-php" data-lang="php"><span class="x">header('Content-Type: application/json');</span>
<span class="x">echo json_encode(array(</span>
<span class="x"> 'jsonrpc' => "2.0",</span>
<span class="x"> 'result' => $result,</span>
<span class="x"> 'id' => $request->id,</span>
<span class="x"> 'error' => null</span>
<span class="x">));</span></code>
为什么我没有用于 php 代码的不同类的令牌?