scrivo / highlight.php

A port of highlight.js by Ivan Sagalaev to PHP
BSD 3-Clause "New" or "Revised" License
695 stars 45 forks source link

[PHP] Highlighting `new` keyword #100

Closed OskarStark closed 1 year ago

OskarStark commented 1 year ago

We render the following code snippet in the Symfony-Docs like: CleanShot 2022-11-23 at 23 42 08@2x

Link

In this case new is a static method and should not be highlighted this way.

Could this be fixed? I am open to provide a PR if you can point me to the right direction.

Thanks

allejo commented 1 year ago

This issue has probably been fixed in highlight.js' latest language definition but this project is severely behind in porting language definitions and new features. Converting the latest hljs language definition and using it in the current release of hlphp might work for you but no guarantees!

OskarStark commented 1 year ago

Ok thank you

cc @wouterj @javiereguiluz @xabbuh (Symfony-Docs Team) cc @kbond (Creator of Foundry)

allejo commented 1 year ago

This project has been on the back burner for me for a while because of difficult API changes in hljs but I would like to get a new release out that brings hlphp on par with hljs hopefully in Q1 of 2023.