From d29a3e5469d8468084641c385ebf16948f7c2437 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 22 Jul 2008 20:00:59 -0400 Subject: sisu-0.68.0 proposed * middle layer document representation changed, (accounting for substantial patch) * texpdf multiple document sizes as specified in config * numerous small fixes [should on the whole be easier to maintain] --- lib/sisu/v0/xml_fictionbook.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v0/xml_fictionbook.rb') diff --git a/lib/sisu/v0/xml_fictionbook.rb b/lib/sisu/v0/xml_fictionbook.rb index 9e9a42f9..ce100f3b 100644 --- a/lib/sisu/v0/xml_fictionbook.rb +++ b/lib/sisu/v0/xml_fictionbook.rb @@ -177,8 +177,8 @@ WOK end def markup(para,type='') para.strip! - para=para.gsub(/^[1-9]~(?:\S+)?\s+/,'') - para=para.gsub(/<~(\d+);(?:\d:\d+|\S\d+);\S\d+><#@dp:#@dp>/,'[(\1)]') + para=para.gsub(/^#{Mx[:lv_o]}[1-9]:\S*?#{Mx[:lv_c]}\s*/,'') + para=para.gsub(/#{Mx[:id_o]}~(\d+);(?:\d:\d+|\S\d+);\S\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}/,'[(\1)]') para=@trans.markup_fictionbook(para) para=if type.empty?; "

#{para}

" else "<#{type}>

#{para}

" @@ -288,7 +288,7 @@ WOK @ds=[] c=0 data.each do |para| - rgx_headers=/<~(\d+);((?:\w|[0-6]:)\d+);(\w\d+)>/ + rgx_headers=/#{Mx[:id_o]}~(\d+);((?:\w|[0-6]:)\d+);(\w\d+)#{Mx[:id_c]}/ if para =~rgx_headers x=(rgx_headers).match(para) if x[3] =~/^[hum]\d+/ -- cgit v1.2.3