Skip to content

Commit e4e233a

Browse files
authored
Merge pull request #6 from ImnIrdst/master
Correct the pdf last sect bug in generate_pdf.py
2 parents cbe4ca9 + a5109e5 commit e4e233a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ x64
2424
*.exe
2525

2626
!suffix-array.pdf
27-
!cheat_sheet.pdf
27+
!cheat_sheet.pdf
28+
29+
contents.tex

generate_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ def get_sections():
1212
line = line.strip()
1313
if len(line) == 0: continue
1414
if line[0] == '[':
15-
if section_name is not None:
16-
sections.append((section_name, subsections))
1715
section_name = line[1:-1]
1816
subsections = []
17+
if section_name is not None:
18+
sections.append((section_name, subsections))
1919
else:
2020
tmp = line.split('\t', 1)
2121
if len(tmp) == 1:

notebook.pdf

21.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)