X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/8c51471f8dba34fc0e315a1c367f6444db1ddb9b..4df8ebf6e27d90d80a273e9b5ab8804fe59774a1:/fixup.rb diff --git a/fixup.rb b/fixup.rb index 2a38801..6461334 100644 --- 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]: ")