One function
MarkDownFile in didix21/mdutils
The author described this change as “Fix #37: Add .md extension if name contains md word”. It counts as a record because the check below fails on the code as it stood at cd35a953c and passes on a32a5d05c, with nothing else changed between the two runs.
Projectdidix21/mdutils
Fix saved2020-06-19
Sharing licenceMIT · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
MarkDownFile class creates a new file of MarkDown extension. Features available are: - Create a file. - Rewrite a file with new data. - Write at the end of the file.
The change
| 10 | 10 | """Creates a markdown file, if name is not empty. | |
| 11 | 11 | :param str name: file name""" | |
| 12 | 12 | if name: | |
| 13 | - | self.file_name = name if 'md' in name else name + '.md' | |
| 13 | + | self.file_name = name if name.endswith('.md') else name + '.md' | |
| 14 | 14 | self.file = open(self.file_name, 'w+', encoding='UTF-8') | |
| 15 | 15 | self.file.close() | |
| 16 | 16 |
The check that tells the two apart
fail→pass·tests/test_fileutils/test_fileutils.py::TestMarkdownFile::test_create_file_case_0
Check file tests/test_fileutils/test_fileutils.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 itcd35a953cebf200f4ebfd11b3ed0af4169ac25a7
Broken version dated2020-05-31
Modulemdutils.fileutils.fileutils
Units changedMarkDownFile
Fingerprintf67a4396029f0050
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.