diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-07-22 20:00:59 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-07-22 20:00:59 -0400 |
commit | d29a3e5469d8468084641c385ebf16948f7c2437 (patch) | |
tree | 1a2306de3c5c1055dbc0374b95f31c335f5da85c /lib/sisu/v0/xml_fictionbook.rb | |
parent | action response query fix (diff) |
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]
Diffstat (limited to 'lib/sisu/v0/xml_fictionbook.rb')
-rw-r--r-- | lib/sisu/v0/xml_fictionbook.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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?; "<p>#{para}</p>" else "<#{type}><p>#{para}</p></#{type}>" @@ -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+/ |