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

A new highlighting package #188

Open
javiereguiluz opened this issue Jan 29, 2025 · 5 comments
Open

A new highlighting package #188

javiereguiluz opened this issue Jan 29, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@javiereguiluz
Copy link
Collaborator

We've discussed in the past about using a PHP-based highlighting package, ideally one that uses TextMate grammar files, to replace our current solution.

Via the January 2025 edition of the excellent "PHP Annotated" newsletter published by @pronskiy I found this project that does exactly that:

https://github.com/phikiphp/phiki

A drawback of this library is that, for now, it inlines styles instead of using CSS classes.

@javiereguiluz javiereguiluz added the enhancement New feature or request label Jan 29, 2025
@wouterj
Copy link
Contributor

wouterj commented Jan 29, 2025

Sounds great! Someone beat me to writing a shiki port 😉

A drawback of this library is that, for now, it inlines styles instead of using CSS classes.

This appears to be the modern thing. All modern syntax highlighters do this as far as I've seen.

@javiereguiluz
Copy link
Collaborator Author

For us it would be a drawback because we usually do minor tweaks in the styles of the code samples. If we use CSS classes, all docs are instantly updated. With inlined styles, we'd need to rebuild all the docs, including the legacy and unsupported docs, and that's very cumbersome to us.

@pronskiy
Copy link

/cc @ryangjchandler

@stof
Copy link
Member

stof commented Jan 29, 2025

Opening an issue on their repo to request (or at least discuss) an option to generate classes is probably better than pinging them in our issue tracker though.

@ryangjchandler
Copy link

ryangjchandler commented Jan 29, 2025

Hi @javiereguiluz and friends. Feel free to open up an issue on the Phiki repo with any suggestions, I'm open to adding opt-in support for classes on code blocks, would just need to know what your expectations are for such as feature.

@wouterj I wouldn't wish the pain of digging into TextMate stuff on anyone, so you're welcome 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

5 participants