Skip to content

Correct the pdf last sect bug in generate_pdf.py #6

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

Merged
merged 1 commit into from
Dec 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Correct the pdf last sect bug in generate_pdf.py
In Previous Version, generate_pdf.py did not generate
the last section int content.txt file.
  • Loading branch information
ImnIrdst committed Dec 19, 2016
commit a5109e5fd8ca67dfb99b524fde642da540124a4b
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ x64
*.exe

!suffix-array.pdf
!cheat_sheet.pdf
!cheat_sheet.pdf

contents.tex
4 changes: 2 additions & 2 deletions generate_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def get_sections():
line = line.strip()
if len(line) == 0: continue
if line[0] == '[':
if section_name is not None:
sections.append((section_name, subsections))
section_name = line[1:-1]
subsections = []
if section_name is not None:
sections.append((section_name, subsections))
else:
tmp = line.split('\t', 1)
if len(tmp) == 1:
Expand Down
Binary file modified notebook.pdf
Binary file not shown.