Fixes the case of heading less markdown

This commit is contained in:
Nemo 2021-05-29 02:18:43 +05:30
parent f61de619bc
commit 3a9971c77a
8 changed files with 26 additions and 17 deletions

View File

@ -17,7 +17,7 @@ class Stitcher:
self.currentPage = 1
self.title = None
self.bookmarks = []
self.currentLevel = None
self.currentLevel = 0
self.oldBookmarks = []
self.dir = os.path.dirname(os.path.abspath(inputBuffer.name))
# Fit complete page width by default

1
tests/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.pdf

5
tests/3.md Normal file
View File

@ -0,0 +1,5 @@
<!-- Convert to PDF as per https://tex.stackexchange.com/a/553075 to ensure bookmarks -->
# Cast of Characters
- Nemo, Master of Ceremonies

View File

@ -1,12 +1,13 @@
existing_bookmarks: remove
author: Wiki, the Cat
subject: A book about adventures of Wiki, the cat.
keywords: wiki,potato,jelly
# Super Potato Book
# Volume 1
[Part 1](2page.pdf)
[Part 2](2page.pdf)
[Part 1](1.pdf)
# Volume 2
[Part 3](2page.pdf)
[Part 4](2page.pdf)
[Part 2](2.pdf)

View File

@ -1,12 +1,12 @@
existing_bookmarks: flatten
title: Super Jelly Book
# Super Potato Book
# Volume 1
[Part 1](2page.pdf)
[Part 2](2page.pdf)
[Part 1](1.pdf)
# Volume 2
[Part 3](2page.pdf)
[Part 4](2page.pdf)
[Part 3](2.pdf)

View File

@ -1,16 +1,10 @@
existing_bookmarks: keep
title: Super Jelly Book
author: Wiki, the Cat
subject: A book about adventures of Wiki, the cat.
keywords: wiki,potato,jelly
# Super Potato Book
# Volume 1
[Part 1](2page.pdf)
[Part 2](2page.pdf)
[Part 1](1.pdf)
# Volume 2
[Part 3](2page.pdf)
[Part 4](2page.pdf)
[Part 3](2.pdf)

2
tests/min.md Normal file
View File

@ -0,0 +1,2 @@
existing_bookmarks: keep
[Part 1](1.pdf)

6
tests/title.md Normal file
View File

@ -0,0 +1,6 @@
---
titlepage: true
---
# Super Potato Book
In memory of Starch