Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing .md extension when filename has 'md' #37

Closed
ndechesne opened this issue Jun 19, 2020 · 1 comment
Closed

Missing .md extension when filename has 'md' #37

ndechesne opened this issue Jun 19, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@ndechesne
Copy link

Describe the bug
A clear and concise description of what the bug is.
When using MarkDown with name set to 'foobar-cmd', then the .md extension is not added.
It looks like a regression introduced in 121cfcb, see
if name:
self.file_name = name if 'md' in name else name + '.md'

To Reproduce
Any file name with the string 'md' can be used, and the output file will be missing the .md extension.

Expected behavior
The .md extension should be added.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux (Arch Linux)

Additional context
Add any other context about the problem here.

@ndechesne ndechesne added the bug Something isn't working label Jun 19, 2020
@didix21
Copy link
Owner

didix21 commented Jun 19, 2020

Good catch! You're free to open a PR. If not I will work on it as soon as I can.
Thank you for reporting it!

didix21 added a commit that referenced this issue Jun 19, 2020
Add unittest for fileutils.

Rename MarkDownFile to MarkdownFile.

Rename rewrite_all_file to write.

Rename append_end to append.
@didix21 didix21 linked a pull request Jun 19, 2020 that will close this issue
didix21 added a commit that referenced this issue Jun 19, 2020
didix21 added a commit that referenced this issue Jun 19, 2020
didix21 added a commit that referenced this issue Jun 19, 2020
didix21 added a commit that referenced this issue Jun 20, 2020
Fix #37: Add .md extension if name contains md word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants