aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 8251905..cff8f29 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -45,6 +45,7 @@ RenderMsg.prototype.raw = function (cb) {
m.value = {}
for (k in this.msg.value) m.value[k] = this.msg.value[k]
var tokens = {}
+ var isTokenNotString = {}
// link to feed starting from this message
if (m.value.sequence) {
@@ -52,6 +53,7 @@ RenderMsg.prototype.raw = function (cb) {
tokens[tok] = h('a', {href:
this.toUrl(m.value.author + '?gt=' + (m.value.sequence-1))},
m.value.sequence)
+ isTokenNotString[tok] = true
m.value.sequence = tok
}
@@ -89,7 +91,8 @@ RenderMsg.prototype.raw = function (cb) {
if (typeof els[i] === 'string') {
for (var tok in tokens) {
if (els[i].indexOf(tok) !== -1) {
- var parts = els[i].split(tok)
+ var delim = isTokenNotString[tok] ? '"' + tok + '"' : tok
+ var parts = els[i].split(delim)
els.splice(i, 1, parts[0], tokens[tok], parts[1])
continue
}