Requests for comment/New hook: ParserBeforePreprocess

Proposal
A new hook: ParserBeforePreprocess. Called in before preprocessing text:

// Parser.php, line ~2803: function preprocessToDom( $text, $flags = 0 ) { wfRunHooks( 'ParserBeforePreprocess', array( $this, &$text, $flags ) ); $dom = $this->getPreprocessor->preprocessToObj( $text, $flags ); return $dom; }

Rationale
Existing hook ParserBeforeInternalParse is advertised as a way to implement custom preprocessors:

Replaces the normal processing of stripped wiki text with custom processing. Used primarily to support alternatives (rather than additions) to the core MediaWiki markup syntax.

But it does not completely meet the goal, because it is not called to preprocess template source. For example, on page:

hook ParserBeforeInternalParse is called 3 times:


 * 1) On original page source.
 * 2) On result of template.
 * 3) On message ''This page was accessed x NaN timess.

But is is not called on template source, so it cannot be used to implement custom preprocessing. At least preprocessing, which effective in both page and template sources.

I failed to find a hook which allows custom preprocessing. This is the reason for proposing this one.