dist/crocodoc.viewer.js
function (template, data) {
            var p;
            for (p in data) {
                if (data.hasOwnProperty(p)) {
                    template = template.replace(new RegExp('\\{\\{' + p + '\\}\\}', 'g'), data[p]);
                }
            }
            return template;
        }
function (template, data) {
            var p;
            for (p in data) {
                if (data.hasOwnProperty(p)) {
                    template = template.replace(new RegExp('\\{\\{' + p + '\\}\\}', 'g'), data[p]);
                }
            }
            return template;
        }
function ( template , data ) { var p ; for ( p in data ) { if ( data . hasOwnProperty ( p ) ) { template = template . replace ( new RegExp ( '\\{\\{' + p + '\\}\\}' , 'g' ) , data [ p ] ) ; } } return template ; }
Apply the given data to a template
@param   {string} template  The template
@param   {Object} data The data to apply to the template
@returns {string}      The filled template
Apply the given data to a template