]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Fix the fixups to properly build (some strings were evaluated as nil)
authorGunnar Wolf <gwolf@gwolf.org>
Mon, 10 Dec 2018 23:40:12 +0000 (23:40 +0000)
committerGunnar Wolf <gwolf@gwolf.org>
Mon, 10 Dec 2018 23:40:12 +0000 (23:40 +0000)
fixup-docbook.rb
fixup.rb

index 7924145d25f36f75dfa308b807192a57137aae9b..5219e45bdd669eb231d43110a042a3974eefc2b6 100755 (executable)
@@ -85,7 +85,9 @@ log 0, 'remove empty notes/web links sections'
 end
 
 log 0, 'remove title from dedication'
 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('<legalnotice>')
 
 log 0, 'move legal notice to bookinfo'
 xml.css('book bookinfo')[0].last_element_child.after('<legalnotice>')
index f8e3c9fe71679198713d612cfd6f278927cc5487..55fae51296f699199def3652051a306d90db04cc 100644 (file)
--- 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('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.
 
 # Join erroneously split paragraphs: Write the contents of the line
 # _preceding_ the unneeded break, the break will be removed.