Merge "Fix missing space after hyperlinked topics"

This commit is contained in:
Zuul 2019-05-10 09:43:42 +00:00 committed by Gerrit Code Review
commit 0169e3a092
1 changed files with 3 additions and 2 deletions

View File

@ -10,13 +10,14 @@ Handlebars.registerHelper('trackContentLine', function(options) {
for (var i = 0; i < words.length; i++) {
if (words[i].startsWith("#")) {
sentence += '<span class="label label-info">'
+ words[i].substring(1) + '</span> ';
+ words[i].substring(1) + '</span>';
} else if (words[i].match(/^https?:\/\//)) {
sentence += '<a href="' + words[i] + '">'
+ words[i] + '</a>';
} else {
sentence += words[i] + " ";
sentence += words[i];
}
sentence += ' ';
}
return new Handlebars.SafeString(sentence);
});