diff options
author | Ev Bogue <ev@evbogue.com> | 2020-01-31 16:10:45 -0600 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2020-01-31 16:10:45 -0600 |
commit | d9325369c27eb5d96522d045004f32f1b01049f8 (patch) | |
tree | df1360c5711d1edb1dce9b720b8e7e996ee409b5 | |
parent | 641a82a1caa3d1b6bce9b7f12948566c272d0c12 (diff) |
fix bug where "end" variable was not cleared properly between hashtags
-rw-r--r-- | render.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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>" |