mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
fix reply and quote btns
This commit is contained in:
parent
46802d3061
commit
6dc5bbe7ac
1 changed files with 2 additions and 2 deletions
|
@ -17,14 +17,14 @@ function handleError(response) {
|
|||
}
|
||||
|
||||
function commentReply(user, url, textarea, quote) {
|
||||
const text = `"@${user}":${url}`;
|
||||
const text = `[${user}](${url})`;
|
||||
let newval = textarea.value;
|
||||
|
||||
if (newval && /\n$/.test(newval)) newval += '\n';
|
||||
newval += `${text}\n`;
|
||||
|
||||
if (quote) {
|
||||
newval += `[bq="${user.replace('"', '\'')}"] ${quote} [/bq]\n`;
|
||||
newval += `> ${quote.replaceAll('\n', '\n> ')}\n\n`;
|
||||
}
|
||||
|
||||
textarea.value = newval;
|
||||
|
|
Loading…
Reference in a new issue