hassanakbar4 / tractive-test

0 stars 0 forks source link

If there are no authors, references in HTML are badly formatted #307

Closed hassanakbar4 closed 3 years ago

hassanakbar4 commented 8 years ago

component_Version 2 cli resolution_fixed type_defect | by martin.thomson@gmail.com


You can see this in the latest TLS 1.3 output: https://tlswg.github.io/tls13-spec/#rfc.references.2

Patch:

--- html.py 2015-12-14 11:52:04.000000000 +1100 +++ /Users/martin/html.py 2015-12-21 18:28:15.000000000 +1100 @@ -538,7 +538,7 @@ bullet_td.attrib['class'] = 'reference' ref_td = E.TD() ref_td.attrib['class'] = 'top'


Issue migrated from trac:307 at 2021-10-20 18:21:38 +0500

hassanakbar4 commented 8 years ago

@{"email"=>"martin.thomson@gmail.com", "name"=>nil, "username"=>nil} commented


Formatting screwup:

--- html.py 2015-12-14 11:52:04.000000000 +1100
+++ /Users/martin/html.py   2015-12-21 18:28:15.000000000 +1100
@@ -538,7 +538,7 @@
             bullet_td.attrib['class'] = 'reference'
             ref_td = E.TD()
             ref_td.attrib['class'] = 'top'
-            last = ref_td
+            last = None
             authors = reference.findall('front/author')
             for j, author in enumerate(authors):
                 organization = author.find('organization')
@@ -576,11 +576,15 @@
                 title_string = ''
             if title_string:
                 if reference.attrib.get("quote-title", "true") == "true": # attribute default value: yes
-                    last.tail = ', "' if len(authors) else '"'
+                    if last is not None:
+                        last.tail = ', "' 
+                    else:
+                        ref_td.text = '"'
                     title_a = E.A(title_string)
                     title_a.tail = '"'
                 else:
-                    last.tail = ', ' if len(authors) else ''
+                    if last is not None:
+                        last.tail = ', '
                     title_a = E.A(title_string)
                     title_a.tail = ''
                 ref_td.append(title_a)
hassanakbar4 commented 8 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} changed status from new to closed

hassanakbar4 commented 8 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} changed resolution from ` tofixed`

hassanakbar4 commented 8 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} commented


Dup with #309

Pulled in suggested patch

hassanakbar4 commented 7 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} commented


Fixed in [2308]:

Merged in patch from martin.thomson@gmail.com, see ticket #307: Fixed a problem where if there are no authors, references in HTML are badly formatted. Fixes issue #307 and #309.