-
Notifications
You must be signed in to change notification settings - Fork 19
Home
aercolino edited this page Sep 13, 2010
·
44 revisions
Currently Chili is at version 2.2, which is older than 1,5 years !!
I’ve started the development of the next version on January 2010.
I still don’t know if it’ll be version 3, or 2.3: we’ll see.
refactor the code so that functions get smaller and easier to understandchange the directory structure of the project, so that other developers can join more easilyextract code from chili.js into independent files under src; then update build.xml to concatenate them again into chili.jsintegrate the global Chili object into a property object of jQuery, like jQuery.chili.optionsrename recipes; example: instead of recipes.js use jquery.chili.recipes.js, instead of php.js use jquery.chili.php.jsfix line numbering, which now breaks after a multiline comment (…examples/geshi1.0.7.22-n.html)make each recipe a real jquery.chili plugin; this way recipes.js will be created by concatenating plugins-
make chili compatible with jQuery 1.4
In previous versions of jQuery, JSON evaluation went through eval, but now it goes either through a built-in JSON object, if available, or the “new Function()” workaround. When using recipes loaded by ajax, the new JSON evaluation generates a parse error and nothing gets colored. -
instead ofthis is not ‘cleanly’ possible due to IE not honoring new lines (\r) when reading text from a DOM element X whose white-space is not ‘pre’ right into the HTML source. There are two ways in IE for setting white-space to ‘pre’ for X, right into the HTML: 1- by putting X inside a PRE; 2- by setting the CSS of X. Users can choose what they prefer, Chili won’t care.<pre><code>...</code></pre>
use<code></code>
alone -
instead ofthis is not possible due to IE not honoring new lines (\r) when setting the innerHTML of a DOM element <br />
and 
use real newlines and spaces respectively - move ‘ln-’ class to CODE. This implies changing the schema for adding metadata.
- use “chili-lang-php” instead of just “php”
- use “chili-ln-1”, instead of just “ln-1”
- use
<li>
, instead of <br>
, and style<pre><code><ul>
so that no bullets are shown - make a CODE class like “chili-off-11-13-17-19” turn off any highlighting for all chars between line 11, offset 13 (inclusive) and line 17, offset 19 (not inclusive)
- make a CODE class like “chili-custom-11-13-17-19-better” apply the “better” class to all chars between line 11, offset 13 (inclusive) and line 17, offset 19 (not inclusive)
- improve the configuration options. For example, make the selection window optionable
- add unit tests
- fix the PHP recipe
Currently the recipe doesn’t work properly when recipes are loaded by ajax. The culprit is this instruction:
var html = this.x( no_php_2, 'html' );
In fact, if the html recipe is still to be downloaded, then the html variable becomes equal to no_php_2 instead of the transformation of no_php_2 by means of the html recipe. This will ultimately cause a replacement that wipes out all previous replacements. - improve all the recipes so that they pass tests like Tricky Code Snippet From Hell
- improve the documentation
- make it easier for contributors to publish their own recipes
- maybe it’s worth making a better object with a recipe; I mean, we could take the recipe JSON object and add methods and properties to it so that we can later call methods on it like:
recipe.hilite(text)
- for lineNumbers it could be better to use
<li>
from the start, instead of <br>
, so we could use<ul>
or<ol>
as a wrapper, after a given option of course; in that case<pre><code><ul>
should be styled accordingly so that no bullets are shown