UPDATE: Chili 1.5 has been released
Changes
- Fixed a bug in the computation of the backreferences
- Improved control and rendering of white space
- Changed the method for detecting an already loaded CSS
- Added a new recipe and example for MySQL
- Updated the bundled jQuery library to version 1.0.4
- Cut the bundled manual.txt to a stub (all is online)
Files
- download all in a zip
- read the manual
- Example: Chili highlighting Chili
- Example: Chili highlighting jQuery
- Example: Chili highlighting PHP
- Example: Chili highlighting MySQL
Is there some place/repository for pre-defined Chili recipies? I plan to use a LOT of code in my blogs, but I don’t want to have to define and test a bunch of recipies, as this deters from my ultimate goal.
The recipes I’ve personally made are the ones included in the zip: JavaScript, LotusScript, PHP, SQL.
Then all the recipes (well, they were called styleSets) of Code Highlighter are still 100% compatible with Chili. For example, the JavaScript Chili recipe is based on the JavaScript CodeHighlighter styleSet. I fixed some bugs, though.
I like the idea of a repository. Send me all the recipes you’ll find or develop and I’ll include them in the next release.
I also can’t find any styleSets for Code Highlighter beyond the languages which Chili already ships recipes for. Creating recipes is straightforward enough, but by no means a trivial task.
How plausible would it be to support (or create a converter for) GeSHi Language Files? There already exist a plethora of language files for that syntax highlighter, but I do like the idea of chili being a lightweight javascript one over GeSHi’s large (and server-side) feature set. GeSHi applies lots of markup to the code, whereas Chili leaves the source nice and clean. Chili’s support of few languages by default is a powerful detractor though.
The trunk of Code Highlighter contains additional recipes for CSS, HTML, and Ruby. And… you’re right! It’s difficult to find other recipes.
GeSHI works quite differently from Chili, so its language definitions are of little use. There is a CodeHighlighter for .NET, but it’s not compatible with Chili either.
I’ll be glad to help in writing new recipes.
What is your email. Didn’t find it anywhere on page nor in manual wich ships with chili. I would gladly share some recepicies with you.
Andrea,
I finally got around to adding Chili to my site and I have to say that it’s a very nice piece of work! Very well done.
I have one recommendation and one request. First, you should replace all references to the the jQuery $ alias with the jQuery object itself. Alternatively, you could use Jorn’s guidelines (http://bassistance.de/2006/12/27/jquery-plugin-authoring-guide/) to scope away the $ reference so that it doesn’t conflict with any other library.
My request is for an option that lets me suppress the checkCSS code. I use a single stylesheet for my entire site and I’ve just added the necessary highlighting styles into that sheet. Rather than have Chili cause an unnecessary call to the server for a non-existent stylesheet, it would be nice to just disable that on-demand. I’ve removed that code from my copy of Chili, but I thought it might be a nice feature to add at some point.
Thanks for the great work!
Mike
Good. I’ll include both your recommendation and your request in the next release. Thanks for the kind words 🙂
Hi Andrea,
I recently noticed that the highlighting in Opera doesn’t seem to work quite right. All of the code gets double-spaced for some reason. Any thoughts?
Also, I made a change to my copy to allow code elements without a classname. You may want to consider this too.
Mike
Yes, I know that about Opera…
I’m developing Chili 2.0 now, but maybe I’ll release Chili 1.5 before, with all your suggestions. Version 2.0 has taken a steep dev curve I didn’t considered, so I’ll need some more time.
Hey Andrea,
I’d like to integrate Chili for my jQuery API browser. I have similar issues as the ones Mike already described: I’d like to apply the highlighting to all pre elements inside the #docs element, and put both CSS and additional JS into static loaded files.
My own attempts at modifying Chili weren’t very succesful, therefore: Any idea when 1.5 could be released?
OK. I’m almost done with 1.5
Jörn, could you give me the list of jQuery 1.1.1 keywords?
Jörn, I already have all but the private functions, could you send’em please?
I’ve just published the new 1.5 release.
The highlighting of jQuery 1.1.1 will be supported without the private functions… it’s not a big issue anyway.