mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
[ticket/13901] Add more whitespace to long quotes for readability
PHPBB3-13901
This commit is contained in:
@@ -56,6 +56,7 @@ class utils implements \phpbb\textformatter\utils_interface
|
||||
*/
|
||||
public function generate_quote($text, array $attributes = array())
|
||||
{
|
||||
$text = trim($text);
|
||||
$quote = '[quote';
|
||||
if (isset($attributes['author']))
|
||||
{
|
||||
@@ -67,7 +68,9 @@ class utils implements \phpbb\textformatter\utils_interface
|
||||
{
|
||||
$quote .= ' ' . $name . '=' . $this->enquote($value);
|
||||
}
|
||||
$quote .= ']' . $text . '[/quote]';
|
||||
$quote .= ']';
|
||||
$newline = (strlen($quote . $text . '[/quote]') > 80) ? "\n" : '';
|
||||
$quote .= $newline . $text . $newline . '[/quote]';
|
||||
|
||||
return $quote;
|
||||
}
|
||||
|
Reference in New Issue
Block a user