mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge pull request #3669 from s9e/ticket/13901
[ticket/13901] Add more whitespace to long quotes for readability
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 || strpos($text, "\n") !== false) ? "\n" : '';
|
||||
$quote .= $newline . $text . $newline . '[/quote]';
|
||||
|
||||
return $quote;
|
||||
}
|
||||
|
Reference in New Issue
Block a user