Subject: | X<> does not populate entries w/o a separate index term |
When an X<> formatting code only contains a single entry to be used
for both the index term and displayed text, the entries method returns
an empty list. The following code demonstrates the error:
#----------------------------------------
use Perl6::Perldoc::Parser;
$result = Perl6::Perldoc::Parser->parse(
\'X<index term>',
{ all_pod => 1 } );
$tree = $result->{tree};
$POD = $tree->content;
$para = $POD->content;
$xform = $para->content;
print "Entries: ", $xform->entries;
#----------------------------------------
As a temporary solution, I'm copying the value of $data_ref->{content}
to $data_ref->{entries} when $data_ref->{target} is undef in the
constructor. However this fails to solve the problem for input like
X<cafE<eacute>>.
This is using version 0.0.5 of Perl6::Perldoc.