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.
Projectastanin/python-tabulate
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
| 22 | 22 | ||
| 23 | 23 | # generate the list of entries in the table header field | |
| 24 | 24 | ||
| 25 | - | return "[{}]\n|====".format(",".join(header_list)) | |
| 25 | + | line = "[{}]\n|====".format(",".join(header_list)) | |
| 26 | + | return line.rstrip() | |
| 26 | 27 | ||
| 27 | 28 | if len(args) == 2: | |
| 28 | 29 | # two arguments are passed if called in the context of aboveline | |
| 29 | 30 | # 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() | |
| 31 | 33 | ||
| 32 | 34 | elif len(args) == 3: | |
| 33 | 35 | # three arguments are passed if called in the context of dataline or headerline | |
| ⋯ | |||
| 37 | 39 | data_line = "|" + "|".join(cell_values) | |
| 38 | 40 | ||
| 39 | 41 | 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() | |
| 41 | 44 | else: | |
| 42 | - | return data_line | |
| 45 | + | return data_line.rstrip() | |
| 43 | 46 | ||
| 44 | 47 | else: | |
| 45 | 48 | raise ValueError( | |
The check that tells the two apart
fail→pass·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
- 2026-03-05_format
- 2023-07-20_format_table
- 2014-02-12_normalize_tabular_data
- 2013-11-20simple_separated_format
- 2013-08-09_normalize_tabular_data