It seems to me that there is a use case where the file (as in this.files element) that is being processed right now should be made available to the preCompile and postCompile functions.
The use case is as follows:
before processing the files, the metadata for all files is gathered (file names, folder structure) - in order to create some sort of documentation site, with relative paths and so on.
in order to create each individual HTML file from the template, it's context should have things like path or size (for example)
Unfortunately, there is no way of knowing, currently, which file is being processed.
I suggest a very simple change. Instead of passing src to the lib/markdown.js module, the entire file should be passed and then populated onto context.
templateContext.file = file;
Also, latest changes are awesome.
I wouldnt want to remove src, but I think adding file to context is a legitimate request.
Beacause of backward compatibility, surely?