From 5c4c7d74f08d8f4dd239ccf9b3cb6ccfa154428e Mon Sep 17 00:00:00 2001 From: Brian Stoner Date: Mon, 12 Sep 2016 07:52:19 -0400 Subject: [PATCH] use the full titles in formatTitle helper unless an ellipsis value is explicitly passed in --- template_helpers.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/template_helpers.js b/template_helpers.js index d59a6fe..ca6dcf1 100644 --- a/template_helpers.js +++ b/template_helpers.js @@ -324,7 +324,12 @@ obj = DDG.parse_link(obj,"text"); } - var tile = DDG.parseAbstract(obj); + var tile = DDG.parseAbstract(obj), + title = tile.main; + + if (ops.ellipsis) { + title = Handlebars.helpers.ellipsis(tile.main, ops.ellipsis); + } return DDG.exec_template('title', { tagName: ops.el || 'span', @@ -332,7 +337,7 @@ classNameSec: ops.classNameSec, subTitle: !ops.noSub && tile.subTitle, optSub: ops.optSub, - title: Handlebars.helpers.ellipsis(tile.main, ops.ellipsis), + title: title, href: (ops.href && this[ops.href]) || ops.href, hrefTitle: tile.main && !tile.main.match(//) ? tile.main : null });