krautzource/sre-to-tree

descendantNodes might not reach all relevant nodes

Closed this issue · 1 comments

pkra commented

While working on #19, I noticed an edge case. In

const descendantNodes = skeletonNode.querySelectorAll('*');

we select the descendants of the skeleton node, not the node.

Now due to the way MathJax+SRE treat links, a "pure" link (e.g., \href{//example.com}{link} will have the skeleton node being inside the anchor tag of the output. Therefore, we will skip the link when working on the descendants.

I don't know if this leads to any real issues or if it's worth fixing. It seems unlikely that somebody will create an expression that start with a link.

pkra commented

I don't know if this leads to any real issues or if it's worth fixing.

Dang, predicting future bugs. The latest SRE beta introduces some interesting changes which trigger this bug. Time to fix it.