Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme Rendering Inconsistency on PHP codes #103

Open
blackjyn opened this issue Dec 21, 2022 · 0 comments
Open

Theme Rendering Inconsistency on PHP codes #103

blackjyn opened this issue Dec 21, 2022 · 0 comments

Comments

@blackjyn
Copy link

blackjyn commented Dec 21, 2022

Hello, I'm migrating from hihglight.js to hihglight.php.
I was able to setup basic things to make it work. However I have issue with the rendering.

In my case I want to highlight some PHP codes with Paraiso Dark theme. BUT the result is bit different. Consider:

highlightjsphp rendering inconsistencies

So ones that was done with highlight.js is perfectly rendered, the enum keyword is recognized and so does the self:$key construct inside the match body.
While ones that was done with hihglight.php is not as perfect as that.

I have tried to use both manual mode and auto detect mode but no luck :

$hl=new Highlighter();

//didn't work 
$hl->setAutodetectLanguages(["php"]);
$highlight=$hl->highlightAuto($codes);

//didn't work either
$highlight=$hl->highlight("php",$codes);

This is my env:

  • PHP 8.2
  • highlight.php v9.18.1.10

help?

UPDATE
This is also affect other sources too, I've tried to highlight JS code and the rendering is different from it should be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant