12345678910111213141516171819202122232425262728 |
- /*
- * Licensed Materials - Property of IBM
- *
- * IBM Cognos Products: SHARE
- *
- * (C) Copyright IBM Corp. 2015
- *
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(["doT"], function(dot) {
- var simpledot = dot;
- simpledot.NOT_REPLACED = "__NOT_REPLACED__";
- simpledot.options = {
- verbose: false
- };
-
- simpledot.simpleTemplate = function(template) {
- var templateToProcess = template;
- if (simpledot.options.verbose) {
- templateToProcess = template.replace(/\{\{(=[\s\S]+?(\}?)+)\}\}/g,"{{$1 || '" + simpledot.NOT_REPLACED + "($1)'}}");
- }
-
- return dot.template(templateToProcess);
- };
-
- return simpledot;
- });
|