diff options
-rw-r--r-- | bin/sisu | 92 | ||||
-rw-r--r-- | bin/sisu3 | 93 | ||||
-rw-r--r-- | bin/sisu_termsheet | 80 | ||||
-rw-r--r-- | bin/sisu_webrick | 80 | ||||
-rw-r--r-- | data/doc/sisu/CHANGELOG_v2 | 18 | ||||
-rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 27 | ||||
-rw-r--r-- | data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim | 4 | ||||
-rw-r--r-- | data/sisu/v2/v/version.yml | 6 | ||||
-rw-r--r-- | data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim | 4 | ||||
-rw-r--r-- | data/sisu/v3/v/version.yml | 6 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf_format.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v3/texpdf_format.rb | 2 |
12 files changed, 312 insertions, 102 deletions
@@ -1,37 +1,73 @@ #!/usr/bin/env ruby # encoding: utf-8 #SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information -#raise "Please, use Ruby1.8 (1.8.4 or later), current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9' -def check_sisu_stable_ruby_version? - rbv_sisu_stable='1.8.7' - if RUBY_VERSION < rbv_sisu_stable - raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" +begin + def check_sisu_stable_ruby_version? + rbv_sisu_stable='1.8.7' + if RUBY_VERSION < rbv_sisu_stable + raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end end -end -def check_sisu_dev_ruby_version? - rbv_sisu_dev='1.9.2' - if RUBY_VERSION < rbv_sisu_dev - raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + def check_sisu_dev_ruby_version? + rbv_sisu_dev='1.9.2' + if RUBY_VERSION < rbv_sisu_dev + raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end end + def check_incompatible_ruby_build? + require 'rbconfig' + e=Config::CONFIG + if RUBY_VERSION == '1.9.2' \ + and e['PATCHLEVEL'].to_i < 180 + raise <<WOK +There are known issues with early versions of ruby1.9.2. +Please, use Ruby 1.9.2p180 or later, +current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} +#{%x{ruby -v}.strip.to_s} + +WOK + end + end + $VERBOSE=nil + $KCODE='u' if RUBY_VERSION < '1.9' + argv=$* + SiSU_version_dir=case argv.inspect + when /--v2/ + check_sisu_stable_ruby_version? + 'v2' + when /--v3/ + check_sisu_dev_ruby_version? + 'v3' + when /--dev/ + check_sisu_dev_ruby_version? + 'v3' + else + check_sisu_stable_ruby_version? + 'v2' + end + SiSU_lib="sisu/#{SiSU_version_dir}" + require "#{SiSU_lib}/hub" +rescue + STDERR.puts 'ERROR' + STDERR.puts $! + STDERR.puts $@ + require 'rbconfig' + e=Config::CONFIG + puts %{ + #{%x{ruby -v}.strip.to_s} + #{RUBY_VERSION} + ruby version: #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} + ruby named: #{e['ruby_version']} + rubylib: #{e['rubylibdir']} + rubylib local: #{e['sitelibdir']} + } + system(%{echo " + system RUBYPATH: ${RUBYPATH} + system RUBYLIB: ${RUBYLIB} + "}) end -check_sisu_stable_ruby_version? -$VERBOSE=nil -$KCODE='u' if RUBY_VERSION < '1.9' -argv=$* -SiSU_version_dir=case argv.inspect -when /--v2/ - 'v2' -when /--v3/ - check_sisu_dev_ruby_version? - 'v3' -when /--dev/ - check_sisu_dev_ruby_version? - 'v3' -else - 'v2' -end -SiSU_lib="sisu/#{SiSU_version_dir}" -require "#{SiSU_lib}/hub" __END__ * Name: SiSU @@ -1,38 +1,73 @@ #!/usr/bin/env ruby # encoding: utf-8 #SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information -#raise "Please, use Ruby1.8 (1.8.4 or later), current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9' -def check_sisu_stable_ruby_version? - rbv_sisu_stable='1.8.7' - if RUBY_VERSION < rbv_sisu_stable - raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" +begin + def check_sisu_stable_ruby_version? + rbv_sisu_stable='1.8.7' + if RUBY_VERSION < rbv_sisu_stable + raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end end -end -def check_sisu_dev_ruby_version? - rbv_sisu_dev='1.9.2' - if RUBY_VERSION < rbv_sisu_dev - raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + def check_sisu_dev_ruby_version? + rbv_sisu_dev='1.9.2' + if RUBY_VERSION < rbv_sisu_dev + raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end end + def check_incompatible_ruby_build? + require 'rbconfig' + e=Config::CONFIG + if RUBY_VERSION == '1.9.2' \ + and e['PATCHLEVEL'].to_i < 180 + raise <<WOK +There are known issues with early versions of ruby1.9.2. +Please, use Ruby 1.9.2p180 or later, +current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} +#{%x{ruby -v}.strip.to_s} + +WOK + end + end + $VERBOSE=nil + $KCODE='u' if RUBY_VERSION < '1.9' + argv=$* + SiSU_version_dir=case argv.inspect + when /--v2/ + check_sisu_stable_ruby_version? + 'v2' + when /--v3/ + check_sisu_dev_ruby_version? + 'v3' + when /--dev/ + check_sisu_dev_ruby_version? + 'v3' + else + check_sisu_dev_ruby_version? + 'v3' + end + SiSU_lib="sisu/#{SiSU_version_dir}" + require "#{SiSU_lib}/hub" +rescue + STDERR.puts 'ERROR' + STDERR.puts $! + STDERR.puts $@ + require 'rbconfig' + e=Config::CONFIG + puts %{ + #{%x{ruby -v}.strip.to_s} + #{RUBY_VERSION} + ruby version: #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} + ruby named: #{e['ruby_version']} + rubylib: #{e['rubylibdir']} + rubylib local: #{e['sitelibdir']} + } + system(%{echo " + system RUBYPATH: ${RUBYPATH} + system RUBYLIB: ${RUBYLIB} + "}) end -check_sisu_stable_ruby_version? -$VERBOSE=nil -$KCODE='u' if RUBY_VERSION < '1.9' -argv=$* -SiSU_version_dir=case argv.inspect -when /--v2/ - 'v2' -when /--v3/ - check_sisu_dev_ruby_version? - 'v3' -when /--dev/ - check_sisu_dev_ruby_version? - 'v3' -else - check_sisu_dev_ruby_version? - 'v3' -end -SiSU_lib="sisu/#{SiSU_version_dir}" -require "#{SiSU_lib}/hub" __END__ * Name: SiSU diff --git a/bin/sisu_termsheet b/bin/sisu_termsheet index 47af2dcc..10318191 100644 --- a/bin/sisu_termsheet +++ b/bin/sisu_termsheet @@ -1,22 +1,72 @@ #!/usr/bin/env ruby # encoding: utf-8 #SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information -raise "Please, use Ruby1.8 (1.8.4 or later), current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9' -#raise "Please, use Ruby1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' -$VERBOSE=nil -argv=$* -SiSU_version_dir=case argv.inspect -when /--v2/ - 'v2' -when /--v3/ - 'v3' -when /--dev/ - 'v3' -else - 'v2' +begin + def check_sisu_stable_ruby_version? + rbv_sisu_stable='1.8.7' + if RUBY_VERSION < rbv_sisu_stable + raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end + end + def check_sisu_dev_ruby_version? + rbv_sisu_dev='1.9.2' + if RUBY_VERSION < rbv_sisu_dev + raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end + end + def check_incompatible_ruby_build? + require 'rbconfig' + e=Config::CONFIG + if RUBY_VERSION == '1.9.2' \ + and e['PATCHLEVEL'].to_i < 180 + raise <<WOK +There are known issues with early versions of ruby1.9.2. +Please, use Ruby 1.9.2p180 or later, +current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} +#{%x{ruby -v}.strip.to_s} + +WOK + end + end + $VERBOSE=nil + argv=$* + SiSU_version_dir=case argv.inspect + when /--v2/ + check_sisu_stable_ruby_version? + 'v2' + when /--v3/ + check_sisu_dev_ruby_version? + 'v3' + when /--dev/ + check_sisu_dev_ruby_version? + 'v3' + else + check_sisu_stable_ruby_version? + 'v2' + end + SiSU_lib="sisu/#{SiSU_version_dir}" + require "#{SiSU_lib}/termsheet" +rescue + STDERR.puts 'ERROR' + STDERR.puts $! + STDERR.puts $@ + require 'rbconfig' + e=Config::CONFIG + puts %{ + #{%x{ruby -v}.strip.to_s} + #{RUBY_VERSION} + ruby version: #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} + ruby named: #{e['ruby_version']} + rubylib: #{e['rubylibdir']} + rubylib local: #{e['sitelibdir']} + } + system(%{echo " + system RUBYPATH: ${RUBYPATH} + system RUBYLIB: ${RUBYLIB} + "}) end -SiSU_lib="sisu/#{SiSU_version_dir}" -require "#{SiSU_lib}/termsheet" __END__ * Name: SiSU diff --git a/bin/sisu_webrick b/bin/sisu_webrick index 1b2a724c..8f79a51f 100644 --- a/bin/sisu_webrick +++ b/bin/sisu_webrick @@ -1,22 +1,72 @@ #!/usr/bin/env ruby # encoding: utf-8 #SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information -raise "Please, use Ruby1.8 (1.8.4 or later), current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9' -#raise "Please, use Ruby1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' -$VERBOSE=nil -argv=$* -SiSU_version_dir=case argv.inspect -when /--v2/ - 'v2' -when /--v3/ - 'v3' -when /--dev/ - 'v3' -else - 'v2' +begin + def check_sisu_stable_ruby_version? + rbv_sisu_stable='1.8.7' + if RUBY_VERSION < rbv_sisu_stable + raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end + end + def check_sisu_dev_ruby_version? + rbv_sisu_dev='1.9.2' + if RUBY_VERSION < rbv_sisu_dev + raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + else check_incompatible_ruby_build? + end + end + def check_incompatible_ruby_build? + require 'rbconfig' + e=Config::CONFIG + if RUBY_VERSION == '1.9.2' \ + and e['PATCHLEVEL'].to_i < 180 + raise <<WOK +There are known issues with early versions of ruby1.9.2. +Please, use Ruby 1.9.2p180 or later, +current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} +#{%x{ruby -v}.strip.to_s} + +WOK + end + end + $VERBOSE=nil + argv=$* + SiSU_version_dir=case argv.inspect + when /--v2/ + check_sisu_stable_ruby_version? + 'v2' + when /--v3/ + check_sisu_dev_ruby_version? + 'v3' + when /--dev/ + check_sisu_dev_ruby_version? + 'v3' + else + check_sisu_stable_ruby_version? + 'v2' + end + SiSU_lib="sisu/#{SiSU_version_dir}" + require "#{SiSU_lib}/webrick" +rescue + STDERR.puts 'ERROR' + STDERR.puts $! + STDERR.puts $@ + require 'rbconfig' + e=Config::CONFIG + puts %{ + #{%x{ruby -v}.strip.to_s} + #{RUBY_VERSION} + ruby version: #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']} + ruby named: #{e['ruby_version']} + rubylib: #{e['rubylibdir']} + rubylib local: #{e['sitelibdir']} + } + system(%{echo " + system RUBYPATH: ${RUBYPATH} + system RUBYLIB: ${RUBYLIB} + "}) end -SiSU_lib="sisu/#{SiSU_version_dir}" -require "#{SiSU_lib}/webrick" __END__ * Name: SiSU diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2 index 21ce50c5..5cf3d984 100644 --- a/data/doc/sisu/CHANGELOG_v2 +++ b/data/doc/sisu/CHANGELOG_v2 @@ -12,6 +12,24 @@ Reverse Chronological: %% STABLE Branch +%% 2.9.0.orig.tar.gz (2011-03-24:12/4) [see 3.0.5] +http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.5-1 + + * move to ruby >=1.9.2p180: simplify development of v3 and maintenance of v2 + * bin/sisu demand ruby >=1.9.2p180 (version checks) + * debian/control, dependencies + [enforcing use of ruby >= 1.9.2 reason for version bump, note should at + least be v1.9.2p180, when issues in earlier versions of ruby-1.9.2 were + first observed to be gone] + + * texpdf bugfix, where map_nametags not found, drop nametag (rather than + crash) + [Debian-live, live-manual (Ben Armstrong, chals?, reported new bug in a + number of translations (that crashed the pdf generator). It turns out where + map_nametags is not found the document crashes.] + + * vim syntax highlighting, fix typo + %% 2.8.2.orig.tar.gz (2011-03-11:10/5) [see 3.0.3] http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.3-1 diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 246cf38a..5727b980 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -13,12 +13,33 @@ Reverse Chronological: %% Development branch UNSTABLE v3 branch once stable will supersede & replace current stable v2 branch +%% 3.0.5.orig.tar.gz (2011-03-24:12/4) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.5-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.5.orig.tar.gz + sisu_3.0.5.orig.tar.gz + sisu_3.0.5-1.dsc + sisu_3.0.5-1.debian.tar.gz + + * move to ruby >=1.9.2p180: simplify development of v3 and maintenance of v2 + * bin/sisu demand ruby >=1.9.2p180 (version checks) + * debian/control, dependencies + [note should at least be v1.9.2p180, when issues in earlier versions of + ruby-1.9.2 were first observed to be gone] + + * texpdf bugfix, where map_nametags not found, drop nametag (rather than + crash) + [Debian-live, live-manual (Ben Armstrong, chals?, reported new bug in a + number of translations (that crashed the pdf generator). It turns out where + map_nametags is not found the document crashes.] + + * vim syntax highlighting, fix typo + %% 3.0.4.orig.tar.gz (2011-03-11:10/5) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.4-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.4.orig.tar.gz - sisu_3.0.4.orig.tar.gz - sisu_3.0.4-1.dsc - sisu_3.0.4-1.debian.tar.gz + 145c409526b26cb0a14b43f4c46219fb828dc41c8211d8f77bad486a98300678 1920526 sisu_3.0.4.orig.tar.gz + 4886196e536e3ad48b29d27b1f0664f77b58ee4b4b21e41c0351c6b3a33dd156 1216 sisu_3.0.4-1.dsc + b41f225c61600a084a729b4d749b30eeebbdbfffc775e227a05159410b4c2a00 281648 sisu_3.0.4-1.debian.tar.gz * sisu_manual, sisu_download, remove references to versions of sisu diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim index e1077034..751202cc 100644 --- a/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,6 +1,6 @@ "SiSU Vim syntax file "SiSU Maintainer: Ralph Amissah <ralph@amissah.com> -"SiSU Markup: SiSU (sisu-2.8.2, 2011-03-11) +"SiSU Markup: SiSU (sisu-2.8.3, 2011-03-20) "(originally looked at Ruby Vim by Mirko Nasato) if version < 600 @@ -36,7 +36,7 @@ if !exists("sisu_no_identifiers") syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" - syn match sisu_sub_header_notes "^\s\+:\(abstract\comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_sub_header_notes "^\s\+:\(abstract\|comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml index db91e9eb..765b05a3 100644 --- a/data/sisu/v2/v/version.yml +++ b/data/sisu/v2/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 2.8.2 -:date_stamp: 2011w10/5 -:date: "2011-03-11" +:version: 2.9.0 +:date_stamp: 2011w12/4 +:date: "2011-03-24" :project: SiSU diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim index aa24113d..00cdbea4 100644 --- a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,6 +1,6 @@ "SiSU Vim syntax file "SiSU Maintainer: Ralph Amissah <ralph@amissah.com> -"SiSU Markup: SiSU (sisu-3.0.3, 2011-03-11) +"SiSU Markup: SiSU (sisu-3.0.5, 2011-03-20) "(originally looked at Ruby Vim by Mirko Nasato) if version < 600 @@ -40,7 +40,7 @@ if !exists("sisu_no_identifiers") syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" - syn match sisu_sub_header_notes "^\s\+:\(abstract\comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_sub_header_notes "^\s\+:\(abstract\|comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index 8084e1f1..bca535e0 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.0.4-beta-rb1.9.2p180 -:date_stamp: 2011w10/5 -:date: "2011-03-11" +:version: 3.0.5-beta-rb1.9.2p180 +:date_stamp: 2011w12/4 +:date: "2011-03-24" :project: SiSU diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index dbf0d095..b2dd0e32 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -419,7 +419,7 @@ module SiSU_TeX_Pdf map_nametags[url][:ocn] else nil end - ocn_lnk=(url=~/^\d+$/ ? url : (map_nametags[url][:ocn])) + ocn_lnk=(url=~/^\d+$/ ? url : ocn_lnk) if ocn_lnk and not ocn_lnk.empty? idx \ ? (str.sub!(rgx_url_internal,"\\hyperlink{#{ocn_lnk}}{#{link}}")) \ diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb index a91095e8..b235e1fc 100644 --- a/lib/sisu/v3/texpdf_format.rb +++ b/lib/sisu/v3/texpdf_format.rb @@ -421,7 +421,7 @@ module SiSU_TeX_Pdf map_nametags[url][:ocn] else nil end - ocn_lnk=(url=~/^\d+$/ ? url : (map_nametags[url][:ocn])) + ocn_lnk=(url=~/^\d+$/ ? url : ocn_lnk) if ocn_lnk and not ocn_lnk.empty? idx \ ? (str.sub!(rgx_url_internal,"\\hyperlink{#{ocn_lnk}}{#{link}}")) \ |