Files
Peter W. J. StaarandPanos Vagenas 981489fb2d fix(doclang): preserve hyperlinks in round trip (#1019)
* fix: doclang hyperlink roundtrip

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fix the unit-tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fix(doclang): scope hrefs so unlinked runs stay unlinked

An href applies to all content of its element, so runs inherit a host's
link. The writer therefore puts a link on an element holding runs only when
all its content shares it, and never on a heading, which reads formatted
runs as flat text. Otherwise the item's own text gets a linked <text> and
each run keeps its own href. On read, a host of runs no longer carries the
link too, and a heading's own href no longer splits it into runs.

Also skip linked runs whose content is excluded, and stop the href lookup
at the end of each element head.

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Co-authored-by: Panos Vagenas <pva@zurich.ibm.com>
2026-11-13 13:14:43 +01:00
..