summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki/mediawiki.template.mustache.js
blob: 624986a9bb8ada9b81a36999fcec3a35bba5b866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*global Mustache */
( function ( mw, $ ) {
	// Register mustache compiler
	mw.template.registerCompiler( 'mustache', {
		compile: function ( src ) {
			return {
				render: function ( data ) {
					return $( $.parseHTML( Mustache.render( src, data ) ) );
				}
			};
		}
	} );

}( mediaWiki, jQuery ) );