Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Render child elements in the xref element #1036

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

kesara
Copy link
Member

@kesara kesara commented Sep 27, 2023

This change fixes a bug where child elements were not rendered in the xref element with a section attribute.

This change only affects HTML & PDF outputs.

Fixes #1034

Example outputs

Example XML snippet:

<section anchor="introduction"><name>Introduction</name>

 <t>See Section <xref target="RFC8610" section="2" sectionFormat="bare">The <em>Style</em> of Data Structure Specification</xref> of <xref target="RFC8610">CDDL</xref>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="parens">The <em>Style</em> of Data Structure Specification</xref> of <xref target="RFC8610">CDDL</xref>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="comma">The <em>Style</em> of Data Structure Specification</xref> of <xref target="RFC8610">CDDL</xref>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="of">The <em>Style</em> of Data Structure Specification</xref> of <xref target="RFC8610">CDDL</xref>.</t>
 <t>See <xref target="RFC8610" section="2">The <em>Style</em> of Data Structure Specification</xref> of <xref target="RFC8610">CDDL</xref>.</t>

 <t>See <xref target="introduction">The <em>Style</em> of Data Structure Specification</xref></t>

 <t>See <xref target="RFC8610" section="2"/>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="parens"/>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="comma"/>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="of"/>.</t>
 <t>See <xref target="RFC8610" section="2" sectionFormat="bare"/>.</t>

</section>

Sample HTML outputs

Before proposed changes

Screenshot 2023-09-27 at 9 40 11 PM

After the proposed changes

Screenshot 2023-09-27 at 9 42 44 PM

Sample PDF outputs

Before proposed changes

Screenshot 2023-09-27 at 9 40 36 PM

After the proposed changes

Screenshot 2023-09-27 at 9 43 53 PM

tests/input/elements.xml Outdated Show resolved Hide resolved
This change fixes a bug where child elements were not rendered in `xref`
element with `section` attribute.

This change only affects HTML & PDF outputs.

Fixes ietf-tools#1034
@kesara kesara merged commit 9ea862c into ietf-tools:main Sep 27, 2023
13 checks passed
@kesara kesara deleted the fix/xref-em branch September 27, 2023 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reftext breaks up on <em in HTML
2 participants