diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-10-23 14:46:08 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-10-23 14:46:12 -0400 |
commit | 07fcd01699e0b67f5a822514d4fcfab4b3c70ff0 (patch) | |
tree | cb1e0d777391ab8d7291d2e6b7ad2f1472fc7b7c /lib/sisu/v2/html_tune.rb | |
parent | version date (diff) |
internal links, punctuation & parentheses issue, fix
* dal, exclude parentheses and square brackets from matching
(requested fix, Ben Armstrong)
* html, remove space between link & following punctuation, parentheses &/or
square brackets
(requested fix, Ben Armstrong)
* epub, remove space between link & following punctuation, parentheses &/or
square brackets
Diffstat (limited to 'lib/sisu/v2/html_tune.rb')
-rw-r--r-- | lib/sisu/v2/html_tune.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sisu/v2/html_tune.rb b/lib/sisu/v2/html_tune.rb index eddd3049..65a66844 100644 --- a/lib/sisu/v2/html_tune.rb +++ b/lib/sisu/v2/html_tune.rb @@ -305,7 +305,7 @@ module SiSU_HTML_Tune data.each do |dob| unless dob.is=='code' if dob.obj =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/ - @word_mode=dob.obj.scan(/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)[.,;:!?)\]]?|(?:#{Mx[:gl_o]}\S+?#{Mx[:gl_c]})+|[^#{Mx[:lnk_o]}#{Mx[:lnk_c]}]+/mu) + @word_mode=dob.obj.scan(/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)[()\[\]]*[.,;:!?]?|(?:#{Mx[:gl_o]}\S+?#{Mx[:gl_c]})+|[^#{Mx[:lnk_o]}#{Mx[:lnk_c]}]+/mu) words=urls(@word_mode) dob.obj.gsub!(/.+/m,words) end #consider change, do a while loop |