You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know enough about the assumptions here to suggest the proper fix. Is html_id in the AST supposed to be an escaped form of identifier, present only if necessary? If so, then myst-theme should use html_id ?? identifier. Otherwise, is it possible for a node to have identifier but that identifier be absent in the DOM?
Pinging @rowanc1 for guidance, but this is not urgent.
The text was updated successfully, but these errors were encountered:
I've noticed that certain XRefs do not jump to the HTML node that contains their definition.
After some debugging, it seems that it's a myst-theme bug. For example:
The final xref doesn't generate a link with an anchor.
I determined that this is a frontend problem by inspecting the underlying xref data, and the final page AST; the final XRef is missing an
html_id
:Details
By inspecting the React renderer for
crossReference
, it looks like we don't have a fall-back for cases withouthtml_id
:myst-theme/packages/myst-to-react/src/crossReference.tsx
Line 180 in 815265f
I don't know enough about the assumptions here to suggest the proper fix. Is
html_id
in the AST supposed to be an escaped form ofidentifier
, present only if necessary? If so, thenmyst-theme
should usehtml_id ?? identifier
. Otherwise, is it possible for a node to haveidentifier
but that identifier be absent in the DOM?Pinging @rowanc1 for guidance, but this is not urgent.
The text was updated successfully, but these errors were encountered: