Is it possible to have a global to convert the linebreaks in a field so that a block of text is rendered as an ordered or numbered list e.g.:
<li>First line here</li>
<li>Second line here</li>
</ol>
I use the global below to convert linebreaks to <br/> tags, but I haven't had any luck modifying it to do what I want.
my $field = $_[0];
$field =~ s/\n/\<br\/\>/gi;
return $field;
}I want to display a certain field as a method, and a numbered list would be the ideal way to do it.
Code:
<ol> <li>First line here</li>
<li>Second line here</li>
</ol>
I use the global below to convert linebreaks to <br/> tags, but I haven't had any luck modifying it to do what I want.
Code:
sub { my $field = $_[0];
$field =~ s/\n/\<br\/\>/gi;
return $field;
}