From 259351d439d016ddb46e2dcb3356cfb9738d7bde Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 10 Mar 2011 08:46:46 -0500 Subject: v2, v3: dal_syntax: (internal document) link matching, a fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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).] --- lib/sisu/v3/dal_syntax.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sisu/v3/dal_syntax.rb') 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 -- cgit v1.2.3