diff options
Diffstat (limited to 'js/codeq/hint.js')
-rw-r--r-- | js/codeq/hint.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/codeq/hint.js b/js/codeq/hint.js index fc2429a..75df457 100644 --- a/js/codeq/hint.js +++ b/js/codeq/hint.js @@ -20,6 +20,8 @@ hintProblemTr = problemDef.hint, hintCommonTr = commonDef.hint, planDef = problemDef.plan, + templatePath = [problemDef.language, problemDef.group, problemDef.problem], + templateName = templatePath.join('/'), clearHints = function () { var i; @@ -46,14 +48,16 @@ }, processTemplate = function (template, args) { - if (!args) + var fn = codeq.templator(template, templatePath, templateName); + return fn(args); +/* if (!args) return template; return template.replace(/\[%=(\w+)%\]/g, function(match, name) { return args[name].toString() .replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>'); - }); + });*/ }, prepareStaticHintContent = function (hintContent, indices, hintId) { |