From: Gunnar Wolf Date: Mon, 10 Dec 2018 23:40:12 +0000 (+0000) Subject: Fix the fixups to properly build (some strings were evaluated as nil) X-Git-Tag: es-printed~145 X-Git-Url: http://pere.pagekite.me/gitweb/text-madewithcc.git/commitdiff_plain/abceb51dd587940a4508ee523297a5df9973b12a?ds=sidebyside;hp=6bfdbe7649f4aa481f093614ccfecdccabafd0e3 Fix the fixups to properly build (some strings were evaluated as nil) --- diff --git a/fixup-docbook.rb b/fixup-docbook.rb index 7924145..5219e45 100755 --- a/fixup-docbook.rb +++ b/fixup-docbook.rb @@ -85,7 +85,9 @@ log 0, 'remove empty notes/web links sections' end log 0, 'remove title from dedication' -xml.css('dedication title')[0].content = "" +if ! xml.css('dedication title').empty? + xml.css('dedication title')[0].content = "" +end log 0, 'move legal notice to bookinfo' xml.css('book bookinfo')[0].last_element_child.after('') diff --git a/fixup.rb b/fixup.rb index f8e3c9f..55fae51 100644 --- a/fixup.rb +++ b/fixup.rb @@ -185,7 +185,7 @@ log 0, 'add heading to colophon page' data.insert(data.index('Made With Creative Commons'), '# Colophon {-}') log 0, 'add dedication as separeate chapter' -data.insert(data.index('“I don’t know a whole lot about nonfiction journalism. . .'), '# Dedication {-}') +data.insert(data.index('"I don\'t know a whole lot about nonfiction journalism. . .'), '# Dedication {-}') # Join erroneously split paragraphs: Write the contents of the line # _preceding_ the unneeded break, the break will be removed.