One function

_asciidoc_row in astanin/python-tabulate

The author described this change as fix #408 - remove trailing whitespace from asciidoc output. It counts as a record because the check below fails on the code as it stood at 2939dc1d1 and passes on 3aa568c66, with nothing else changed between the two runs.

Fix saved2026-03-05
Sharing licenceMIT · LICENSE
Change size+7 4

What the code was meant to do, written into the code itself as a docstring

handle header and data rows for asciidoc format

The change

2222
2323 # generate the list of entries in the table header field
2424
25- return "[{}]\n|====".format(",".join(header_list))
25+ line = "[{}]\n|====".format(",".join(header_list))
26+ return line.rstrip()
2627
2728 if len(args) == 2:
2829 # two arguments are passed if called in the context of aboveline
2930 # print the table header with column widths and optional header tag
30- return make_header_line(False, *args)
31+ line = make_header_line(False, *args)
32+ return line.rstrip()
3133
3234 elif len(args) == 3:
3335 # three arguments are passed if called in the context of dataline or headerline
3739 data_line = "|" + "|".join(cell_values)
3840
3941 if is_header:
40- return make_header_line(True, colwidths, colaligns) + "\n" + data_line
42+ line = make_header_line(True, colwidths, colaligns) + "\n" + data_line
43+ return line.rstrip()
4144 else:
42- return data_line
45+ return data_line.rstrip()
4346
4447 else:
4548 raise ValueError(

The check that tells the two apart

failpass·test/test_output.py::test_asciidoc

Check file test/test_output.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it2939dc1d17e13a71c256042d9ad46bfd9d8a07b8
Broken version dated2026-03-05
Moduletabulate.__init__
Units changed_asciidoc_row
Fingerprintfbfd9437b03a8480
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in astanin/python-tabulate