我使用Jekyll与kramdown和pypygs,它工作良好的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 %}
每一行都是一个span, 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代码?
如果您想忘记代码块开头的php开始标记,您必须将pyents startinline参数设置为true。
{% highlight php startinline=true %}
参见pyents文档
截至2016年8月8日,从https://github.com/jekyll/jekyll/issues/1633#issuecomment-238383509
我们不再支持pypygs了。我们用胭脂
新语法如下:
```php?start_inline=true
header('Content-Type: application/json');
echo json_encode(array(
'jsonrpc' => "2.0",
'result' => $result,
'id' => $request->id,
'error' => null
));
```