]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Recognzie one more URL.
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 11 Mar 2018 06:42:34 +0000 (06:42 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Sun, 11 Mar 2018 06:44:10 +0000 (06:44 +0000)
fixup.rb

index 64613347bba4dd3b8d89e61a987a3cd4e9c1dd10..7b1f8bf8a7197421022507caf804fa159356a8c2 100644 (file)
--- a/fixup.rb
+++ b/fixup.rb
@@ -351,7 +351,7 @@ log 0, 'add figure titles required by Docbook for referable figures'
 end
 
 log 0, 'adding http:// to all URLs and turn them into links'
 end
 
 log 0, 'adding http:// to all URLs and turn them into links'
-data.map {|lin| lin.gsub!(/(^|\s+)([-a-z0-9\\.]+\.(cc|com|edu|eu|io|is|it|kr|net|nl|nz|org|se))/, '\\1http://\\2')}
+data.map {|lin| lin.gsub!(/(^|\s+)([-a-z0-9\\.]+\.(ca|cc|com|edu|eu|io|is|it|kr|net|nl|nz|org|se))/, '\\1http://\\2')}
 data.map {|lin| lin.gsub!(/\b(https?:\/\/[-a-z0-9\\.]+)(\/[-\\.\/a-zA-Z0-9#_\?&=,]+[-\/a-zA-Z0-9#_\?&=,])?/, '[](\\1\\2)')}
 
 log 0, 'Writing processed file'
 data.map {|lin| lin.gsub!(/\b(https?:\/\/[-a-z0-9\\.]+)(\/[-\\.\/a-zA-Z0-9#_\?&=,]+[-\/a-zA-Z0-9#_\?&=,])?/, '[](\\1\\2)')}
 
 log 0, 'Writing processed file'