morrisonlevi / web-php

The www.php.net site
http://www.php.net
Other
2 stars 1 forks source link

Syntax highlighting without inline styles #2

Open Nessworthy opened 8 years ago

Nessworthy commented 8 years ago

Discussion points:

Other points to consider:

kelunik commented 8 years ago

It's pretty easy, I'll push something soon.

morrisonlevi commented 8 years ago

It's a private repository but collaborators should have access: https://github.com/kelunik/php-highlight

kelunik commented 8 years ago

We already use class names in the user notes instead of inline styles. Well, kind of pretty hacky. https://github.com/php/web-php/blob/36168258a227b83926341c37eec0c151f8335b6e/include/layout.inc#L14-L49

Sobak commented 7 years ago

Hi!

I'd like to pipe, if I could. As I also thought about that, let me summarise what I found:

1) I'm going to add something like ClientSideHighlighter in next stable version of PhD. A highlighter class which would return valid wrappers possible to be handled by projects like prism.js

2) It will be shameless advertisement of a project written by a friend of mine, but I'd like to mention it, just to get you know what our options are. There is a modern, but also very fast (more than 2x faster than GeSHi on every tested case... if only GeSHi means everything and still can be used as a reference today). https://github.com/kadet1090/keylighter (it has minimal requirement of PHP 5.5 and for why is that important, see below)

3) And now, the sad part comes. PHP version requirements:

So those are my 2cts (and, yeah, I kinda like nested lists...)