PHP syntax highlighting in wiki not working

Issue #2515 wontfix
Chris Nanney
created an issue

I've read the help guides and seem to be doing it right, but nothing is highlighting:

{{{ {{{


Putting my code here. }}} }}}

Also tried "php5" and "text/x-php". No Luck.

Comments (7)

  1. Chris Nanney reporter

    I see that you have to include php tags in order for it to highlight. This makes it inconvenient for short 1-2 line snippets to always have to include opening and closing tags.

    I think if the code field is marked as PHP, it should all be highlighted as such without requiring tags.

  2. Robert Holak

    The Pygments lexer does have options to enable highlighting the PHP syntax without the open and close tags, but there was already an issue #916 that looks to be marked "won't fix". That issue, if expanded like in its comments, would have allowed for such options to be passed. I am hoping that it can be looked at again - something to include the parser options after the short/mime code would be very nice:

    #!php startinline=True
    function Howdy {
        print "Howdy\n";


  3. Dylan Etkin

    Hi Chris,

    I am pleased that there is a work-around that you can use.

    I am afraid that we are focusing more on the code-viewing side of Bitbucket and that we will not really be spending a lot of time on the wiki syntax ATM.

    I am going to put the issue on hold for the moment and we will try to look at it again in the few months.

    Sorry for the trouble,


  4. Anonymous

    Good to see bitbucket does not support such an obscure and seldom used language as php. It would be even better if this were advertised, so I wouldn't have wasted time trying to get this to work!

  5. Jorge Morales

    wontfix... :(

    as it stands it doesn't work as advertised...

    $this->highlighting = false;
    while($this->highlighting == false){
        $this->do("Wait for fix");
        $this->do("Grow a mighty beard.");
        $this->do("Shave beard, keep moustache and win @ Movember.");

    above block has #!php but without <?php it won't highlight properly... the txt editor button you give us to help us write, doesn't exactly help much when snippet is in php and we try that out....

  6. Log in to comment