Rationale: This is semantically correct HTML5. It also allows for typographic control of spacing between paragraphs.
How to implement was outlined in this thread.
Change functions_content.php from
Code: Select all
function bbcode_nl2br($text)
{
// custom BBCodes might contain carriage returns so they
// are not converted into <br /> so now revert that
$text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);
return $text;
}
Code: Select all
function bbcode_nl2br($text)
{
// It looks like this works. Can't put in multiple lines of whitespace, though.
// first, lets trim starting/trailing whitespace
$text = trim($text);
// temporarily replace two or more consecutive newlines
// into SOH characters (not used in normal text)
$text = preg_replace('~(\r\n|\n){2,}|$~', "\001", $text);
// convert remaining (i.e. single) newlines into html br's
$text = nl2br($text);
// finally, replace SOH chars with paragraphs
$text = preg_replace('/(.*?)\001/s', '<p>$1</p>' . "\n", $text);
return $text;
}
Also required is to change content.css font-sizes from the below, to desired sizes; perhaps 1.0 em.
Code: Select all
.panel p {
font-size: 1.2em;
margin-bottom: 1em;
line-height: 1.4em;
}
.content p {
font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
font-size: 1.2em;
margin-bottom: 1em;
line-height: 1.4em;
}