]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - fixup.rb
Adjust fixup.rb to recognize more references.
[text-madewithcc.git] / fixup.rb
index 4561ab7180eab9f8e8f28d621a329174a8f46742..7127318dd6a9ec6c48013e2cbb76c7e6904597e1 100644 (file)
--- a/fixup.rb
+++ b/fixup.rb
@@ -258,8 +258,8 @@ data.each_with_index do |lin, idx|
     scope=$1.gsub(" ", "-")
   end
   # First, mark note reference
-  lin.sub!(/([a-z]\.["”]?)(\d+)(\s)/, "\\1[^" + scope + "-\\2]\\3")
-  lin.sub!(/([a-z]\.["”]?)(\d+)$/, "\\1[^" + scope + "-\\2]")
+  lin.sub!(/([a-z][\.\)]+["”]?)(\d+)(\s)/, "\\1[^" + scope + "-\\2]\\3")
+  lin.sub!(/([a-z][\.\)]+["”]?)(\d+)$/, "\\1[^" + scope + "-\\2]")
   # Next, mark note content, only between /Web Links?|Notes/ and next heading
   if noteblock
     lin.sub!(/^(\d+)\. /, "[^" + scope + "-\\1]: ")