]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Adjust markdown ot list title and author the way pandoc like it.
authorPetter Reinholdtsen <pere@hungry.com>
Tue, 6 Feb 2018 08:24:38 +0000 (09:24 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Tue, 6 Feb 2018 08:24:38 +0000 (09:24 +0100)
fixup.rb

index f70f996996231bfb386d306ca267c3495da4b0bc..cd025c15f39a04cf574214da6599b48b0b31bd2b 100644 (file)
--- a/fixup.rb
+++ b/fixup.rb
@@ -66,6 +66,12 @@ end
 log 0, 'correct emphesis in some titles'
 data.map {|lin| lin.gsub!(/ *\* \\\[/, ' *\[')}
 
 log 0, 'correct emphesis in some titles'
 data.map {|lin| lin.gsub!(/ *\* \\\[/, ' *\[')}
 
+log 0, 'tag title and author'
+data.delete_at(1) # Remove unwanted blank line between title and authors
+data[0].sub!(/^/, '% ') # title
+data[1].sub!(/^/, '% ') # authors
+data[1].sub!(/ and /, ';') # authors
+
 # Mark up headings: Very artisanal and suboptimal, but should do the
 # trick.
 #
 # Mark up headings: Very artisanal and suboptimal, but should do the
 # trick.
 #