]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Adjust fixup.rb to recognize more references.
authorPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 21:28:53 +0000 (22:28 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 21:28:53 +0000 (22:28 +0100)
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]: ")