Skip to content

Commit

Permalink
fix: Return orgnization for orgnization only contacts (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara authored Aug 28, 2022
1 parent 20cdb44 commit 2c9dfaf
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
4 changes: 3 additions & 1 deletion tests/input/elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,9 @@ for opt, value in opts:
</contact>
<t>
Reviews and helpful comments have also been received from
<contact asciiFullname="Ana Kikabidze" fullname="ანა კიკაბიძე"/>.
<contact asciiFullname="Ana Kikabidze" fullname="ანა კიკაბიძე"/>
and
Org: <contact><organization>TEST</organization></contact>
</t>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion tests/valid/elements.bom.text
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


Reviews and helpful comments have also been received from ანა
კიკაბიძე (Ana Kikabidze).
კიკაბიძე (Ana Kikabidze) and Org: TEST

A.2. Arbitrary^superscript in section _title_

Expand Down
2 changes: 1 addition & 1 deletion tests/valid/elements.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


Reviews and helpful comments have also been received from ანა
კიკაბიძე (Ana Kikabidze).
კიკაბიძე (Ana Kikabidze) and Org: TEST

A.2. Arbitrary^superscript in section _title_

Expand Down
6 changes: 5 additions & 1 deletion tests/valid/elements.prepped.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,11 @@ for opt, value in opts:
</contact>
<t indent="0" pn="section-appendix.a.1-2">
Reviews and helpful comments have also been received from
<contact asciiFullname="Ana Kikabidze" fullname="ანა კიკაბიძე"/>.
<contact asciiFullname="Ana Kikabidze" fullname="ანა კიკაბიძე"/>
and
Org: <contact>
<organization showOnFrontPage="true">TEST</organization>
</contact>
</t>
</section>
<section numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2">
Expand Down
2 changes: 1 addition & 1 deletion tests/valid/elements.text
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ A.1. Contributors


Reviews and helpful comments have also been received from ანა
კიკაბიძე (Ana Kikabidze).
კიკაბიძე (Ana Kikabidze) and Org: TEST

A.2. Arbitrary^superscript in section _title_

Expand Down
4 changes: 3 additions & 1 deletion tests/valid/elements.v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,9 @@ <h3 id="name-contributors">
</address>
<p id="appendix-A.1-2">
Reviews and helpful comments have also been received from
<span class="contact-name"><span class="non-ascii">ანა კიკაბიძე</span> (<span class="ascii">Ana Kikabidze</span>)</span>.<a href="#appendix-A.1-2" class="pilcrow"></a></p>
<span class="contact-name"><span class="non-ascii">ანა კიკაბიძე</span> (<span class="ascii">Ana Kikabidze</span>)</span>
and
Org: <span class="contact-name">TEST</span><a href="#appendix-A.1-2" class="pilcrow"></a></p>
</section>
<section id="appendix-A.2">
<h3 id="name-arbitrary-superscript-in-se">
Expand Down
2 changes: 1 addition & 1 deletion tests/valid/elements.wip.text
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


Reviews and helpful comments have also been received from ანა
კიკაბიძე (Ana Kikabidze).
კიკაბიძე (Ana Kikabidze) and Org: TEST

A.2. Arbitrary^superscript in section _title_

Expand Down
3 changes: 2 additions & 1 deletion xml2rfc/util/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def full_author_name_set(a):
else:
ascii = full_author_ascii_name(a)
else:
ascii = None
name = full_org_name(a)
ascii = full_org_ascii_name(a)
if name == ascii:
ascii = None
return name, ascii
Expand Down

0 comments on commit 2c9dfaf

Please sign in to comment.