X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/398d53b9b75a4c27171ddc99577dae33b6dfdada..ec1f99bc5a8174d85f26b89a7c86bfa895e35662:/fixup.rb diff --git a/fixup.rb b/fixup.rb index 4561ab7..7127318 100644 --- 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]: ")