Natural Order Development

Copyright © 2008 by Leeland Artra
You are not logged in.
Login
Register



A Django site.

Code Highlighting

CodeHighlighting

1. Introduction

Code highlighting for a software providing/support/sales/discussion sight is mandatory. I have already started growing accustom to the BBCODE editing style for the posts and I also like the sparse nature of the Markdown formating for the Wiki. So what I need to do is very carefully integrate a plug in ability to have code highlighting on the fly as well as being able to designate and control which code highlighting syntax is used.

BBCODE already gives me the tie in by allowing the code tag to have a language specification. That should make it a lot easier. However, Markdown syntax does not have anything like that, unless I add something like a header marker for a code block. The indenting requirement of a code block in Markdown seems a little annoying. Maybe I'll come to like it.

In the mean time I have found the code highlighting engine I will graft into place:

2. Pygments Code Highlighter

Pygments a python based generic syntax highlighter. It offers the following features

3. Implementation Notes

Of course the first thing is to do is get it installed and then read all the docs. After that I can start putting into place a design for how to make it optionally available but automatically used if present.

Tags:

Last Modified: 2008-06-02 00:09:13 by Leeland - [ Snip Changes ] [ Wiki History ]



Powered by Sphene Community Tools