]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Add code in fixup.rb to recognize more note references.
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 25 Feb 2018 07:15:15 +0000 (07:15 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Sun, 25 Feb 2018 07:15:15 +0000 (07:15 +0000)
fixup.rb

index 2a3880157e1d0496af0c0011d0861b37eeb8f08b..64613347bba4dd3b8d89e61a987a3cd4e9c1dd10 100644 (file)
--- a/fixup.rb
+++ b/fixup.rb
@@ -260,6 +260,11 @@ data.each_with_index do |lin, idx|
   # First, mark note reference
   lin.sub!(/([a-z][\.\)]+["”]?)(\d+)(\s)/, "\\1[^" + scope + "-\\2]\\3")
   lin.sub!(/([a-z][\.\)]+["”]?)(\d+)$/, "\\1[^" + scope + "-\\2]")
+  # Special case some refs hard to match otherwise
+  lin.sub!(/(section.\)) 36 /, "\\1[^" + scope + "-36] ")
+  lin.sub!(/(Data Futures Forum in 2014,)1 /, "\\1[^" + scope + "-1] ")
+  lin.sub!(/(5,080)5/, "\\1[^" + scope + "-5]")
+  lin.sub!(/(sustain her creative work.) 1/, "\\1[^" + scope + "-1]")
   # Next, mark note content, only between /Web Links?|Notes/ and next heading
   if noteblock
     lin.sub!(/^(\d+)\. /, "[^" + scope + "-\\1]: ")