diff options
Diffstat (limited to 'lib/sisu/v0/texpdf_format.rb')
-rw-r--r-- | lib/sisu/v0/texpdf_format.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 81646f23..92333d28 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -423,8 +423,7 @@ WOK end @string end - def special_characters_1(para) - # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list + def special_characters_1(para) # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list #p @@utf_8.list #@string=Iconv.conv('ISO-8859-1', 'UTF-8', @string) word=@string.scan(/\S+|\n/) #unless line =~/^(?:0~\S|%+\s)/ @@ -791,9 +790,9 @@ WOK @words=[] @string.each do |word| @words << if word=~/\{.+?\}(?:https?|ftp):\S+/ - if word =~/\\\{(.+?)\\\}((?:https?|ftp)\S+?)([.,](?:\s|$))/ - r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\S+?)(?:[.,](?:\s|$)|(?:\s|$))/ - d=/\\\{.+?\\?\}(?:https?|ftp):\S+([.,](?:\s|$))/.match(word).captures.to_s + if word =~/\\\{(.+?)\\\}((?:https?|ftp)\S+?)([;.,](?:\s|$))/ + r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\S+?)(?:[;.,](?:\s|$)|(?:\s|$))/ + d=/\\\{.+?\\?\}(?:https?|ftp):\S+([;.,](?:\s|$))/.match(word).captures.to_s else r=%r/\\\{(.+?)\\?\}((?:https?|ftp):\S+)/ d='' |