fix bug in empty markdown file

This commit is contained in:
ville rantanen
2017-09-12 11:26:09 +03:00
parent 4c0fa2ddae
commit c222ab22b5

View File

@@ -100,6 +100,8 @@ class slide_reader:
self.data.append(new_page) self.data.append(new_page)
f.close() f.close()
self.file_start_page.append(len(self.data)) self.file_start_page.append(len(self.data))
if len(self.data)==0:
raise ValueError("File does not have a # header")
self.toc() self.toc()
self.pages=len(self.data) self.pages=len(self.data)
self.inc_page_no(0) self.inc_page_no(0)