Chili enzyme for .htaccess

Here’s a chili (javascript syntax highlighter) enzyme for highlighting .htaccess code snippets. This is for the 1.x series (I’m using 1.8b here) so this will likely not work for the latest 2.0 release without some modification. Also the highlighting is pretty basic, but at least you get comments and the first directive on a line.

place in recipes.js

ChiliBook.recipes[ "htaccess.js" ] = {
    steps: {
        com : { exp: /(?:^|\n)\s*\#.*/ }
        ,dir : { exp: /(?:^|\n)\s*\w+/ }
    }
};

place in recipes.css

.htaccess .com { color: green; }
.htaccess .dir { color: navy; }

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.