![]() |
Prism: a new syntax highlighting engine
Hi to all,
this is my first post here, I'm rather new with PHP programming but not with programming) and I've just build my first app with it. It's called "Prism", it is a syntax highlighting engine. I already know PHP's got Geshi, but I don't like it too much. Prism is light (~12Ko), extensible and supports a dozen of languages atm (but writting a new one is really easy) among: PHP, JS, HTML, XML, Python, Ruby, etc. You can play with it here : Prism's pastebin. I just hope my little SQLite db will support your posts! The Prism library (ie highlighting engine) will be released in the next few days with a good licence. Cheers: Kibē. |
Can't really say much until you link to the source. ;-)
|
Salathe: I think you can; you just have to paste some code and see if it's working fine for you.
|
I can't say much, what I will say is that the highlighting doesn't appear finished (missing highlighting on parts of the code which normally would be highlighted differently, in various languages).
|
Thanks Salathe,
you're right for PHP, all the buildin functions were not part of it. I've updated the php language file so that it should be fine now. But what are the other ones ? The xml and css you posted seems to render fine for me (maybe you have to change the css theme ?) |
The CSS didn't highlight the attribute selector (like
[...]) and the XML didn't highlight the element names. By "didn't highlight" I mean no HTML tags wrapped that particular part of the paste so the highlighter doesn't see them as anything to be highlighted.I'll have a proper look around this evening, hopefully. |
Right again, I've not included attribute selectors because I don't know/use them too much. I've tried to fix them by reading the specs. It just needs testing.
As for the XML you submitted, can you paste it here please so that I can analyse what's going on ? Thanks again for your help. |
XML Code:
It's #44 in your pastebin. P.S. Looks like GeSHi has no problem with it. :-P |
|
|
Well done Salathe; that's fixed now (I think so).
|
Great to see improvements already, remember to post back when you open up the source code. :-)
|
|
| All times are GMT. The time now is 11:46 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0