Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove <rPh> from SharedString

  • Loading branch information...
commit 667eeb2e90cb68dea4386a147a7184ec0969a4a9 1 parent 828d0dc
@typester authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Data/XLSX/Parser/SharedStrings.pm
View
5 lib/Data/XLSX/Parser/SharedStrings.pm
@@ -13,6 +13,7 @@ sub new {
_data => [],
_is_string => 0,
+ _is_ph => 0,
_buf => '',
}, $class;
@@ -46,6 +47,7 @@ sub get {
sub _start {
my ($self, $parser, $name, %attrs) = @_;
$self->{_is_string} = 1 if $name eq 'si';
+ $self->{_is_ph} = 1 if $name eq 'rPh';
}
sub _end {
@@ -56,11 +58,12 @@ sub _end {
push @{ $self->{_data} }, $self->{_buf};
$self->{_buf} = '';
}
+ $self->{_is_ph} = 0 if $name eq 'rPh';
}
sub _char {
my ($self, $parser, $data) = @_;
- $self->{_buf} .= $data if $self->{_is_string};
+ $self->{_buf} .= $data if $self->{_is_string} && !$self->{_is_ph};
}
1;

0 comments on commit 667eeb2

Please sign in to comment.
Something went wrong with that request. Please try again.