如何在Github Wiki中突出显示PHP

Ren*_*Pot 11 php syntax-highlighting github

所以,我知道如何在github wiki中进行颜色编码.例如json:

```json
  {}
````
Run Code Online (Sandbox Code Playgroud)

但对于PHP,这不起作用

```php
// code here
```
Run Code Online (Sandbox Code Playgroud)

我必须这样做:

```
<?php
// code here
```
Run Code Online (Sandbox Code Playgroud)

或这个: php <?php // code here

这看起来很难看,因为你会<?php在每个代码块中看到它.有没有解决的办法?

Fra*_*llo 16

我之前也遇到过这个问题.如果你使用:```php这还不够.它需要一个php打开块<?php才能启动代码突出显示.它的跨浏览器是github服务器上的pygments设置.把票放在github上.

Pygments有一个"startinline"选项,它只与PhpLexer有关.它允许语法高亮而无需打开

您可以在此处查看Pygments文档:http: //pygments.org/docs/lexers/在页面中搜索startinline以跳转到它.

startinline

如果给定和True,词法分析器开始用PHP代码突出显示(即:不需要启动<?php).默认值为False.