I gave it a whirl on a CVS head copy of Moodle. Installation and basic operation seem great. Some comments:
- does Moodle's plain text format disable all filters? I'd never noticed before but thought that the plain text format would be a good fit for this module since code could have all sorts of wierdness in it that you don't want interfered with. On the other hand, it makes sense to have filters disabled for the plain text format because, in a sense, you're saying "don't mess with this text" when you choose it. Maybe this filter could also form the basis of a resource type ('highlighted source code') where the the various options (line numbers etc.) could be exposed in the setup screen?
- leaving off the closing square bracket of the opening tag seems to confuse it. I get a warning (possibly only visible in debug mode) and the text up to the closing tag gets eaten.
- it might be very slightly better HTML to have both
preandcodetags wrapping the content though generally this won't have an actual visible impact. It matches better with the choice of[code]as your syntax too. - is there an inline mode where you could insert variable names or short snippets of code into running text? Probably just
codewithout theprewould be better here (see above point). - the line number start option and highlight capability interact weirdly i.e. I ask for line number 4 and 5 to be highlighted, and ask it to start at line 4 then it highlights line 8 and 9.
- the
divimmediately inside theliis probably unnecessary as theliacts as a block element anyway. - It adds a blank, but numbered line at the end if you don't close the tag on the same line as the last bit of code.
- the padding around the code seems tailored to fit the linenumbered version and seems a bit lopsided when they aren't present.
- I got a weird style duplication, possibly another interaction of highlight, it was only noticeable by viewing the source.
Notice the strange ',' in the middle of the style tag:
div style="font-size:110%;font-family:monospace;font-weight:normal;','font-size:110%;font-family:monospace;"
I can see this being really useful, hopefully Moodle.org can be upgraded to this new version too.