Torus expects all links to be of {type: 'a'}, previously the digest tool was passing {type: 'xref} which would not display in a torus page correctly. This change converts those xref into a links, and handles a mismatch in content models. Some rules:
An xref with a page attribute will have the resulting a link with an idref pointing to that page.
An xref with an idref attribute will have the resulting a link with an anchor pointing to the idref. Currently, this is ignored in torus, but will be ingested and maintained if the link is edited.
An xref without a page attribute, will have it's idref set to the current page. This is an unfortunate case since the link won't do anything until we start supporting the anchor attribute.
In all these cases, the target attribute is now passed an maintained in torus.
Torus expects all links to be of {type: 'a'}, previously the digest tool was passing {type: 'xref} which would not display in a torus page correctly. This change converts those
xref
intoa
links, and handles a mismatch in content models. Some rules:a
link with an idref pointing to that page.a
link with an anchor pointing to the idref. Currently, this is ignored in torus, but will be ingested and maintained if the link is edited.In all these cases, the
target
attribute is now passed an maintained in torus.To test this end to end, you need the torus changes here: https://github.com/Simon-Initiative/oli-torus/pull/3705
Fixes https://github.com/Simon-Initiative/oli-torus/issues/3536