1
0
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:
JoshyPHP
2015-05-30 22:17:14 +02:00
parent 073f3e6fdc
commit 2f0d11ba3c
5 changed files with 23 additions and 6 deletions

View File

@@ -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;
}