Skip to content

Commit

Permalink
Merge pull request #20 from FabioRosado/empty-file
Browse files Browse the repository at this point in the history
Allow custom empty files
  • Loading branch information
dhellmann authored Jun 20, 2018
2 parents fa8c4b6 + 7d411a1 commit 573197e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ env/
TAGS
*~
.DS_Store
.idea
.vscode
spelling/spelling_wordlist.txt
.tox/
.coverage/
Expand Down
2 changes: 1 addition & 1 deletion sphinxcontrib/spelling/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _build_combined_wordlist(self):
outfile.writelines(infile_contents)

# Check for newline, and add one if not present
if not infile_contents[-1].endswith('\n'):
if infile and not infile_contents[-1].endswith('\n'):
outfile.write(u'\n')

return combined_word_list
Expand Down

0 comments on commit 573197e

Please sign in to comment.