Skip to content

Commit

Permalink
fix behaviour for missing attributes in utterances
Browse files Browse the repository at this point in the history
Change-Id: Ia2bd6bdce3e470fe74f8405958d89936eb1955c9
  • Loading branch information
Akron committed Jun 25, 2024
1 parent 82064bb commit 81dbe3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/KorAP/XML/Annotation/DeReKo/Structure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ sub parse {

my $data;
foreach (@$attrs) {
$data = $_->{'#text'};
$data = $_->{'#text'} or next;

$data =~ s/</&lt;/g;
$data =~ s/>/&gt;/g;
Expand Down
4 changes: 2 additions & 2 deletions t/real/corpus/KTC/001/000001/struct/structure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<fs type="attr">
<f name="who">Mai Thi Nguyen-Kim</f>
<f name="start">0:00</f>
<f name="end">01:20</f>
<f name="end"></f>
</fs>
</f>
</fs>
Expand Down Expand Up @@ -1894,4 +1894,4 @@
</fs>
</span>
</spanList>
</layer>
</layer>

0 comments on commit 81dbe3b

Please sign in to comment.