$content =~ s{ (?:\ |\s)+ }{ }gx;
$content =~ s{ (?:\ |\s)+$ }{}gx;
$content =~ s{ (?: <br/?> )+$ }{}gx;
+ $content =~ s{ <ul>\s*</ul> | <ol>\s*</ol> }{}igx;
+ $content =~ s{ (?: <p>\s*</p>\s* )+ \Z }{}imgx;
my @parts = grep { $_ } map {
if (substr($_, 0, 1) eq '<') {
my ($self, $file) = @_;
# { source => $xmlfile,
- # name => 'ZUGFeRD-invoice.xml',
- # description => $::locale->text('ZUGFeRD invoice'), }
+ # name => 'factur-x.xml',
+ # description => $::locale->text('Factur-X/ZUGFeRD invoice'), }
my $file_name = blessed($file->{source}) && $file->{source}->can('filename') ? $file->{source}->filename : "" . $file->{source}->filename;
my $embed_name = $file->{name} // $file_name;