Strip superfluous new lines at the end of a post.
This commit is contained in:
parent
5ade310e15
commit
32050c8eab
@ -128,6 +128,9 @@
|
|||||||
// Reply limit (deletes thread when this is reached)
|
// Reply limit (deletes thread when this is reached)
|
||||||
$config['reply_limit'] = 250;
|
$config['reply_limit'] = 250;
|
||||||
|
|
||||||
|
// Strip superfluous new lines at the end of a post
|
||||||
|
$config['strip_superfluous_returns'] = true;
|
||||||
|
|
||||||
// For resizing, max values
|
// For resizing, max values
|
||||||
$config['thumb_width'] = 255;
|
$config['thumb_width'] = 255;
|
||||||
$config['thumb_height'] = 255;
|
$config['thumb_height'] = 255;
|
||||||
|
@ -905,6 +905,9 @@
|
|||||||
$body = preg_replace("/''(.+?)''/m", "<em>$1</em>", $body);
|
$body = preg_replace("/''(.+?)''/m", "<em>$1</em>", $body);
|
||||||
$body = preg_replace("/\*\*(.+?)\*\*/m", "<span class=\"spoiler\">$1</span>", $body);
|
$body = preg_replace("/\*\*(.+?)\*\*/m", "<span class=\"spoiler\">$1</span>", $body);
|
||||||
}
|
}
|
||||||
|
if($config['strip_superfluous_returns'])
|
||||||
|
$body = preg_replace('/\s+$/', '', $body);
|
||||||
|
|
||||||
$body = preg_replace("/\n/", '<br/>', $body);
|
$body = preg_replace("/\n/", '<br/>', $body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user