Allow closing elements to start with "text"

Change-Id: Ifa06a3e7ddf8f32ae80763501e30d4a9c7f05365
diff --git a/t/data/text_with_textsigle_in_text.i5.xml b/t/data/text_with_textsigle_in_text.i5.xml
new file mode 100644
index 0000000..7a8af32
--- /dev/null
+++ b/t/data/text_with_textsigle_in_text.i5.xml
@@ -0,0 +1,9 @@
+<idsCorpus>
+  <idsHeader type="text">
+    <textSigle>CORP/DOC.00001</textSigle>
+  </idsHeader>
+  <text>
+   <textSigle>CORP/DOC.00001b</textSigle>
+   <p>  This is a text, that starts with *2* (not "twenty-two" ;) blanks!</p>
+  </text>
+</idsCorpus>
diff --git a/t/script.t b/t/script.t
index 2847550..dfec340 100644
--- a/t/script.t
+++ b/t/script.t
@@ -798,4 +798,15 @@
   )->stderr_like(qr!No tokenizer chosen!);
 };
 
+subtest 'Test handling of textSigle in text' => sub {
+
+  my $t = test_tei2korapxml(
+    file => catfile($f, 'data', 'text_with_textsigle_in_text.i5.xml'),
+    tmp => 'script_out',
+    param => '-ti'
+  )
+    ->stderr_like(qr!tei2korapxml:.*? text_id=CORP_DOC.00001!)
+    ->stderr_unlike(qr!line with closing text-body tag 'text' contains additional information!);
+};
+
 done_testing;