Update: I no longer (2012-08-05) use Chili, so this bug isn't relevant

Update: I haven't figured it out, but I did get a workaround. The bug is that any unmatched end of text leads to deleted characters in the middle of the text, so I added a line $.chili.recipes[recipeName]._main.endoftext = {_match: /$/}; to the downloadRecipe method, and now the bug doesn't show up.

I'm running Firefox 7.0.1 and I'm coming across a very strange bug in my syntax highlighter, chili. It doesn't show up with any other browser (and I can't try older Firefox versions, with the auto-updating). I'm still working out the details, but it's erasing all the code from a string to 2 characters from the end. Thus:
$('foo').show();

becomes

$('foo').show();
If you don't see a problem, great. If you do, switch to a different browser. Or figure out what's going on and let me know.

More experiments:

$('foo').show();

becomes

$('foo').show();
func('foo').show();

becomes

func('foo').show();
$("foo").show({});

becomes

$("foo").show({});
$(foo).show();

becomes

$(foo).show();
$('foo').show(x);

becomes

$('foo').show(x);
$('foo').show(
);

becomes

$('foo').show(
);
(foo).show();

becomes

(foo).show();
show();

becomes

show();
x() ;

becomes

x() ;
somechars);

becomes

somechars);
(somechars)

becomes

(somechars)
somechars;

becomes

somechars;
{somechars};

becomes

{somechars};
somechars

becomes

somechars

But it's different for the different highlighters. The above was for javascript; this is HTML:

somechars

becomes

somechars

and this is PDF:

somechars

becomes

somechars

Leave a Reply


Warning: Undefined variable $user_ID in /home/public/blog/wp-content/themes/evanescence/comments.php on line 75