From 36301db45d0422a4713b9d232cbdb4f932140ea6 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 28 Aug 2015 18:17:35 +0200 Subject: Add support for template arguments in hints --- js/prolog.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js') diff --git a/js/prolog.js b/js/prolog.js index a377cc9..e3c395c 100644 --- a/js/prolog.js +++ b/js/prolog.js @@ -187,6 +187,11 @@ hintHandlers = { 'static': function (type, template, serverHint) { codeq.log.debug('Processing static hint'); + if (serverHint.args) { + template = template.replace(/\[%=(\w+)%\]/g, function(match, name) { + return serverHint.args[name]; + }); + } jqHints.append('
' + template + '
'); // TODO: incorporate any serverHint.args // no hint cleaner here, a static hint remains on the screen }, -- cgit v1.2.1