1 /** 2 * @fileOverview Text handling functionality 3 * @author <a href="http://www.bobs-bits.com">Stephen Reay</a> 4 */ 5 6 /** 7 * @namespace Text processing functionality 8 */ 9 BTM.Text = {}; 10 11 BTM.Text.makeCodeView = function makeCodeView(element) { 12 return new CodeView(element, type); 13 }; 14 15 BTM.Text.CodeView = function CodeView(element, type, options) { 16 17 }; 18 19 20 BTM.Text.parseTemplate = function parseTemplate(string, data, identifier) { 21 identifier = identifier || '%'; 22 Object.forEach(data, function (entry, key) { 23 var bit = (identifier + key + identifier).escapeRegex(); 24 string = string.replace(bit, entry); 25 }); 26 27 return string; 28 };