Browse Source

fix of #markout chars position data collecting

master
Simon Grim 9 years ago
parent
commit
22b3ba93ce
  1. 9
      js/twister_formatpost.js

9
js/twister_formatpost.js

@ -402,14 +402,19 @@ function htmlFormatMsg(msg) { @@ -402,14 +402,19 @@ function htmlFormatMsg(msg) {
if (i !== 0) {
l = kindOfL(i - 1);
} else {
l = 0;
}
if (j !== msg.str.length) {
r = kindOfR(j);
} else {
r = 0;
}
if (i === 0 || l === -10) {
if ((i === 0 && r < 0) || l === -10) {
p.push({i: i, k: j - i, t: -1, w: w, a: -1, p: -1});
w = false;
} else if (j === msg.str.length || r === -10) {
} else if ((j === msg.str.length && l < 0) || r === -10) {
p.push({i: i, k: j - i, t: 1, w: w, a: -1, p: -1});
w = false;
} else {

Loading…
Cancel
Save