Commit b8c210bd authored by twanvl's avatar twanvl

always call the combine function when expanding keywords

parent 8746c5ff
......@@ -686,7 +686,6 @@ bool KeywordDatabase::tryExpand(const Keyword& kw,
result += remove_tag(tagged.substr(0, start), _("<kw-"));
// Combine keyword & reminder with result
if (expand) {
String reminder;
try {
reminder = kw.reminder.invoke(ctx)->toString();
......@@ -695,14 +694,10 @@ bool KeywordDatabase::tryExpand(const Keyword& kw,
}
ctx.setVariable(_("keyword"), to_script(total));
ctx.setVariable(_("reminder"), to_script(reminder));
ctx.setVariable(_("expand"), to_script(expand));
result += _("<kw-"); result += expand_type; result += _(">");
result += combine_script->eval(ctx)->toString();
result += _("</kw-"); result += expand_type; result += _(">");
} else {
result += _("<kw-"); result += expand_type; result += _(">");
result += total;
result += _("</kw-"); result += expand_type; result += _(">");
}
// Add to usage statistics
if (stat && stat_key) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment