mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
[ticket/10620] Add more whitespace to long quotes in JS
PHPBB3-10620
This commit is contained in:
parent
4c9507e20a
commit
5a55ce3f68
@ -241,6 +241,7 @@ function addquote(post_id, username, l_wrote, attributes) {
|
||||
* @return {!string} Quote block to be used in a new post/text
|
||||
*/
|
||||
function generateQuote(text, attributes) {
|
||||
text = text.replace(/^\s+/, '').replace(/\s+$/, '');
|
||||
var quote = '[quote';
|
||||
if (attributes.author) {
|
||||
// Add the author as the BBCode's default attribute
|
||||
@ -253,7 +254,9 @@ function generateQuote(text, attributes) {
|
||||
quote += ' ' + name + '=' + formatAttributeValue(value.toString());
|
||||
}
|
||||
}
|
||||
quote += ']' + text + '[/quote]';
|
||||
quote += ']';
|
||||
var newline = ((quote + text + '[/quote]').length > 80 || text.indexOf('\n') > -1) ? '\n' : '';
|
||||
quote += newline + text + newline + '[/quote]';
|
||||
|
||||
return quote;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user