aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/texpdf_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/texpdf_format.rb')
-rw-r--r--lib/sisu/v2/texpdf_format.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 41802557..895fd8d8 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -963,6 +963,16 @@ WOK
para_array=[]
str=if word
word.each do |w| # _ - / # | : ! ^ ~
+ if w !~/http:/ \
+ and w=~/\/\S+?\// \
+ and w.length > 6
+ w.gsub!(/([_.\/])/,'\1\-')
+ #elsif w !~/http:/ \
+ #and w=~/([_,.;:\/|=])/ \
+ #and w.length > 10
+ # w.gsub!(/([_,.;:\/|=])/,'\1\-')
+ # w.gsub!(/(--)(\S{4,})/,'\1\-\2')
+ end
w.gsub!(/#{Mx[:gl_o]}#lt#{Mx[:gl_c]}/,'<'); w.gsub!(/#{Mx[:gl_o]}#gt#{Mx[:gl_c]}/,'>')
w.gsub!(/[\\]?~/,'<=tilde>')
w.gsub!(/[#{Mx[:br_line]}#{Mx[:br_paragraph]}]/,' \newline ') #watch