So, I know how to do color coding in the github wiki. For example json
:
```json
{}
````
But for PHP this doesn't work
```php
// code here
```
I'll have to do this:
```
<?php
// code here
```
Or this:
php
<?php
// code here
Which looks ugly, because you'll see the <?php
in every block of code. Is there a way around this?
I've encountered this problem before as well. if you use: ```php
it isn't enough. it requires a php open block <?php
before it starts code highlighting. Its cross browser and is a pygments setting on the github servers. Put a ticket in on github.
Pygments has a "startinline" option which is only relevant for the PhpLexer. It allows syntax highlighting without the opening
You can view the Pygments documentation on it here: http://pygments.org/docs/lexers/ Search the page for startinline to jump right to it.
If given and True the lexer starts highlighting with php code (i.e.: no starting <?php
required). The default is False.
As you can see in this list, that is compiled from this pygments list, you should be able to use ```php
without problems. If it doesnt work, try one of the following
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With