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);
|
||||
if (text = data.slice(0, index)) nodes.push($.tn(text));
|
||||
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)) {
|
||||
href = "#" + id;
|
||||
className = 'quotelink';
|
||||
|
||||
@ -2801,7 +2801,12 @@ Quotify =
|
||||
nodes.push $.tn text
|
||||
|
||||
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
|
||||
href = "##{id}"
|
||||
className = 'quotelink'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user