Would you be interested in accepting iafan@0da6819 as a PR?
This commit introduces AsOrderedListHTML function which, in addition to highlighting the source, wraps each line in <li>..</li>, and then adds <ol>..</ol> global wrapper. The resulting highlighted source code now has line numbers.
Commit comes with full test coverage.