From 9659c0ef5eee47241dd1401c66a823994e34b401 Mon Sep 17 00:00:00 2001 From: Prad Nelluru Date: Sun, 19 Apr 2020 16:33:30 -0400 Subject: [PATCH] Trim chapter titles to ensure bookmarks are valid in PDF (#11) --- src/fetch.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fetch.cr b/src/fetch.cr index 58b69a0..fea5fc9 100644 --- a/src/fetch.cr +++ b/src/fetch.cr @@ -69,7 +69,7 @@ module Muse::Dl if add_bookmark # Run pdftk and add the bookmark to the file - pdftk.add_bookmark tmp_pdf_file, chapter_title + pdftk.add_bookmark tmp_pdf_file, chapter_title.strip end # Now we can move the file to the proper PDF filename