# Pastebin 5oSGYBBC has_field 'text' => ( type => 'Text', trim => { transform => sub { my $string = shift; # Not trimming starting spaces to avoid breaking list formatting, # consider trimming again once this uses Markdown $string =~ s/\s+$//; return $string; } } );