Fix board when quotifying a cross-board inlined post.
This commit is contained in:
parent
305a567f9d
commit
803734c896
@ -3358,7 +3358,7 @@
|
|||||||
index = data.indexOf(quote);
|
index = data.indexOf(quote);
|
||||||
if (text = data.slice(0, index)) nodes.push($.tn(text));
|
if (text = data.slice(0, index)) nodes.push($.tn(text));
|
||||||
id = quote.match(/\d+$/)[0];
|
id = quote.match(/\d+$/)[0];
|
||||||
board = (m = quote.match(/^>>>\/([a-z\d]+)/)) ? m[1] : g.BOARD;
|
board = (m = quote.match(/^>>>\/([a-z\d]+)/)) ? m[1] : $('.quotejs', post.el).pathname.split('/')[1];
|
||||||
if (board === g.BOARD && $.id(id)) {
|
if (board === g.BOARD && $.id(id)) {
|
||||||
href = "#" + id;
|
href = "#" + id;
|
||||||
className = 'quotelink';
|
className = 'quotelink';
|
||||||
|
|||||||
@ -2801,7 +2801,12 @@ Quotify =
|
|||||||
nodes.push $.tn text
|
nodes.push $.tn text
|
||||||
|
|
||||||
id = quote.match(/\d+$/)[0]
|
id = quote.match(/\d+$/)[0]
|
||||||
board = if m = quote.match /^>>>\/([a-z\d]+)/ then m[1] else g.BOARD
|
board =
|
||||||
|
if m = quote.match /^>>>\/([a-z\d]+)/
|
||||||
|
m[1]
|
||||||
|
else
|
||||||
|
# Get the post's board, whether it's inlined or not.
|
||||||
|
$('.quotejs', post.el).pathname.split('/')[1]
|
||||||
if board is g.BOARD and $.id id
|
if board is g.BOARD and $.id id
|
||||||
href = "##{id}"
|
href = "##{id}"
|
||||||
className = 'quotelink'
|
className = 'quotelink'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user