aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-03-10 08:46:46 -0500
committerRalph Amissah <ralph@amissah.com>2011-03-10 08:46:57 -0500
commit259351d439d016ddb46e2dcb3356cfb9738d7bde (patch)
treef77b4a35df6592dee2c12fd37972602296295fff
parentv2, v3: dal_syntax + downstream output, email regex revised (diff)
v2, v3: dal_syntax: (internal document) link matching, a fix
[Debian-live, live-manual (Jose Luis Zabalza, Ben Armstrong, reported bug in Spanish translation markup (that crashed the pdf generator). Bug in markup subsequently identified as "versátil,#{iso-hybrid}#, se" which the interpreter identified as an internal document link to a comma (instead of as being monospace markup), markup should have been "versátil, #{iso-hybrid}#, se" this fix prevents that incorrect match, (but the markup remains faulty and the monospace markup is not identified as such without the corrected spacing). Unfortunate "grave" results for what is a pretty insignificant data entry typo (there are no doubt other such situations).]
-rw-r--r--data/doc/sisu/CHANGELOG_v212
-rw-r--r--data/doc/sisu/CHANGELOG_v312
-rw-r--r--lib/sisu/v2/dal_syntax.rb2
-rw-r--r--lib/sisu/v3/dal_syntax.rb2
4 files changed, 26 insertions, 2 deletions
diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2
index 23c482e3..cdd738a6 100644
--- a/data/doc/sisu/CHANGELOG_v2
+++ b/data/doc/sisu/CHANGELOG_v2
@@ -22,6 +22,18 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.8.2.orig.tar.gz
for mail, (removes occasional interference with urls having embedded email
addresses)
+ * dal_syntax: (internal document) link matching, a fix
+
+ [Debian-live, live-manual (Jose Luis Zabalza, Ben Armstrong, reported bug in
+ Spanish translation markup (that crashed the pdf generator). Bug in markup
+ subsequently identified as "versátil,#{iso-hybrid}#, se" which the interpreter
+ identified as an internal document link to a comma (instead of as being
+ monospace markup), markup should have been "versátil, #{iso-hybrid}#, se" this
+ fix prevents that incorrect match, (but the markup remains faulty and the
+ monospace markup is not identified as such without the corrected spacing).
+ Unfortunate "grave" results for what is a pretty insignificant data entry
+ typo (there are no doubt other such situations).]
+
* texpdf: url (regex) pattern match fix (/https?/)
%% 2.8.1.orig.tar.gz (2011-03-05:09/6)
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index 97d15bf3..9814094d 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -23,6 +23,18 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.3.orig.tar.gz
for mail, (removes occasional interference with urls having embedded email
addresses)
+ * dal_syntax: (internal document) link matching, a fix
+
+ [Debian-live, live-manual (Jose Luis Zabalza, Ben Armstrong, reported bug in
+ Spanish translation markup (that crashed the pdf generator). Bug in markup
+ subsequently identified as "versátil,#{iso-hybrid}#, se" which the interpreter
+ identified as an internal document link to a comma (instead of as being
+ monospace markup), markup should have been "versátil, #{iso-hybrid}#, se" this
+ fix prevents that incorrect match, (but the markup remains faulty and the
+ monospace markup is not identified as such without the corrected spacing).
+ Unfortunate "grave" results for what is a pretty insignificant data entry
+ typo (there are no doubt other such situations).]
+
* texpdf: url (regex) pattern match fix (/https?/)
%% 3.0.2.orig.tar.gz (2011-03-05:09/6)
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index 55556371..76287464 100644
--- a/lib/sisu/v2/dal_syntax.rb
+++ b/lib/sisu/v2/dal_syntax.rb
@@ -401,7 +401,7 @@ module SiSU_Syntax
dob.obj.gsub!(/(^|\s)([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)/,"\\1#{Mx[:url_o]}\\2#{Mx[:url_c]}")
dob.obj.gsub!(/(^|[ ])\{\s*(.+?)\s*\}(\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/,
"\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3\\4") #any remaining linked text or image
- dob.obj.gsub!(/\{\s*(.+?)\s*\}#(\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/,
+ dob.obj.gsub!(/\{\s*(.+?)\s*\}#([a-zA-Z0-9][a-zA-Z0-9_-]*)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/,
"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}#{Mx[:rel_o]}\\2#{Mx[:rel_c]}\\3") #any remaining linked text or image, check need
dob.obj.gsub!(/\{\s*(.+?)\s*\}(#{Mx[:rel_o]}\S+?#{Mx[:rel_c]})/,
"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #any remaining linked text or image, check need
diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb
index 61253561..2f6353bc 100644
--- a/lib/sisu/v3/dal_syntax.rb
+++ b/lib/sisu/v3/dal_syntax.rb
@@ -407,7 +407,7 @@ module SiSU_Syntax
dob.obj.gsub!(/(^|\s)([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)/,"\\1#{Mx[:url_o]}\\2#{Mx[:url_c]}")
dob.obj.gsub!(/(^|[ ])\{\s*(.+?)\s*\}(\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/,
"\\1#{Mx[:lnk_o]}\\2#{Mx[:lnk_c]}\\3\\4") #any remaining linked text or image
- dob.obj.gsub!(/\{\s*(.+?)\s*\}#(\S+?)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/,
+ dob.obj.gsub!(/\{\s*(.+?)\s*\}#([a-zA-Z0-9][a-zA-Z0-9_-]*)([;,.]?)(?=\s|[#{Mx[:br_line]}#{Mx[:br_paragraph]}#{Mx[:br_nl]}#{Mx[:en_a_o]}#{Mx[:en_b_o]}]|$)/,
"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}#{Mx[:rel_o]}\\2#{Mx[:rel_c]}\\3") #any remaining linked text or image, check need
dob.obj.gsub!(/\{\s*(.+?)\s*\}(#{Mx[:rel_o]}\S+?#{Mx[:rel_c]})/,
"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #any remaining linked text or image, check need