Skip to content

Commit

Permalink
thanks to Neil Soiffer for spotting the annotations Fatal for failed-…
Browse files Browse the repository at this point in the history
…to-parse inputs
  • Loading branch information
dginev committed Jul 9, 2020
1 parent eb0ac03 commit 1383ff2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/LaTeXML/Post/MathML/Presentation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,13 @@ sub addAccessibilityAnnotations {
# Part I: Top-down. Recover the meaning of a subtree as an accessible annotation
my ($self, $node, $sourcenode, $currentnode) = @_;
my $meaning;
my $name = getQName($node);
my $source_name = getQName($sourcenode);
my $src_parent = $sourcenode->parentNode;
my $src_parent_name = getQName($src_parent);
my $name = getQName($node);
my $source_name = getQName($sourcenode);
my $src_parent = $sourcenode->parentNode;
my $src_parent_name = getQName($src_parent);
if ($source_name eq 'ltx:XMath' or $src_parent_name eq 'ltx:XMath') {
# likely this formula failed to parse, we have no business adding annotations here
return; }
my $src_grandparent = $src_parent->parentNode;
my $src_grandparent_name = getQName($src_grandparent);
my $current_node_name = getQName($currentnode);
Expand Down

0 comments on commit 1383ff2

Please sign in to comment.