Browse Source

fix bug where "end" variable was not cleared properly between hashtags

master
Ev Bogue 3 years ago
parent
commit
d9325369c2
  1. 3
      render.js

3
render.js

@ -100,10 +100,11 @@ function render (msg, keys, preview) {
for (i = 0; i < array.length; i++) {
word = array[i]
if (word.startsWith('#')) {
let end
//console.log(word + ' is a hashtag')
if ((word[word.length -1] === '.') || word[word.length - 1] === ',') {
//console.log('and it ends with a ' + word[word.length - 1])
var end = word[word.length - 1]
end = word[word.length - 1]
word = word.substring(0, word.length - 1)
}
var hashtag = "<a href='#?" + word + "'>" + word + "</a>"

Loading…
Cancel
Save