Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #13 from duckduckgo/brian/full-titles-by-default
Browse files Browse the repository at this point in the history
Use full titles in formatTitle helper unless explicitly overridden
  • Loading branch information
bbraithwaite authored Sep 12, 2016
2 parents b3ca1ef + 5c4c7d7 commit 505fb26
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions template_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,20 @@
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',
className: ops.className || 'title',
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(/<b>/) ? tile.main : null
});
Expand Down

0 comments on commit 505fb26

Please sign in to comment.