Skip to content

Commit

Permalink
fix --text-page-separator option ignures empty pages, fix #45
Browse files Browse the repository at this point in the history
  • Loading branch information
jya-dev committed Nov 10, 2024
1 parent 561ad06 commit ba1f8ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions supernotelib/cmds/supernote_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def convert_and_concat_all(converter, total, file_name, save_func, separator):
data = []
for i in range(total):
data.append(converter.convert(i))
data = list(filter(lambda x : x is not None, data))
data = list(map(lambda x : '' if x is None else (x + '\n'), data))
if len(data) > 0:
alldata = ((separator + '\n') if separator else '').join(f'{row}\n' for row in data)
alldata = ((separator + '\n') if separator else '').join(data)
save_func(alldata, file_name)
else:
print('no data')
Expand Down

0 comments on commit ba1f8ef

Please sign in to comment.