but allows line break.
* The \n are replaced by
*
* @param string $sCode
* @param string|null $sId
*/
public static function MakeForCode(string $sCode, string $sId = null)
{
$oCode = new UIContentBlock($sId, ['ibo-is-code']);
$sCode = str_replace("\n", '
', $sCode);
$oCode->AddSubBlock(new Html($sCode));
return $oCode;
}
public static function MakeForPreformatted(string $sCode, string $sId = null)
{
$sCode = '
'.$sCode.''; return static::MakeForCode($sCode, $sId); } }