Project Aon Git Repositories
/
project-aon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Output UTF-8; handle empty lines
[project-aon.git]
/
common
/
scripts
/
xmlize.pl
diff --git
a/common/scripts/xmlize.pl
b/common/scripts/xmlize.pl
index
349d37d
..
063bd05
100755
(executable)
--- a/
common/scripts/xmlize.pl
+++ b/
common/scripts/xmlize.pl
@@
-8,6
+8,7
@@
use strict;
use warnings;
use utf8;
use open ':encoding(UTF-8)';
use warnings;
use utf8;
use open ':encoding(UTF-8)';
+use open ':std', ':encoding(UTF-8)';
my $FILE_EXTENSION = 'txt';
my $BASE_INDENT = ' ';
my $FILE_EXTENSION = 'txt';
my $BASE_INDENT = ' ';
@@
-121,6
+122,10
@@
print << "(End of XML footer)";
sub xmlize {
my( $inline, $infile ) = @_;
sub xmlize {
my( $inline, $infile ) = @_;
+ if(!defined $inline || $inline eq "") {
+ return "";
+ }
+
$inline =~ tr/\t/ /;
$inline =~ s/[[:space:]]{2,}/ /g;
$inline =~ s/[[:space:]]+$//;
$inline =~ tr/\t/ /;
$inline =~ s/[[:space:]]{2,}/ /g;
$inline =~ s/[[:space:]]+$//;