diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-02-03 20:45:52 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-02-03 20:45:52 -0500 |
commit | 7db7a01a7d86e95159bdef47162dc180accf1acb (patch) | |
tree | 156013cdb28b483ac122c26b9f2e199c9a7d9d12 /lib/sisu/v3dv/xml.rb | |
parent | debian/changelog (3.1.12-1) (diff) | |
parent | v3dv, dal +, use symbols to identify document objects type (is) and group (of) (diff) |
Merge tag 'sisu_3.1.13' into debian/sid
Diffstat (limited to 'lib/sisu/v3dv/xml.rb')
-rw-r--r-- | lib/sisu/v3dv/xml.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sisu/v3dv/xml.rb b/lib/sisu/v3dv/xml.rb index 776c0376..1187e02e 100644 --- a/lib/sisu/v3dv/xml.rb +++ b/lib/sisu/v3dv/xml.rb @@ -204,7 +204,7 @@ WOK @@xml[:sc]=sc end def xml_structure(dob,type='norm') - if dob.is=='heading' + if dob.is==:heading lv=dob.ln n=dob.ln - 1 n3=dob.ln + 2 @@ -306,7 +306,7 @@ WOK @trans.char_enc.utf8(dob) if @sys.locale =~/utf-?8/i #% utf8 dob=@trans.markup(dob) if @rcdc==false \ - and (dob.is =~/^meta/ \ + and (dob.is ==:meta \ and dob.obj =~/Document Information/) @rcdc=true end @@ -319,7 +319,7 @@ WOK if defined? dob.ocn \ and dob.ocn.to_s =~/\d+/ x=SiSU_XML_Format::FormatSeg.new(@md,dob) - if dob.is=='heading' + if dob.is==:heading xml_structure(dob) dob.obj=case dob.ln when 1; x.heading_body1 @@ -330,25 +330,25 @@ WOK when 6; x.heading_body6 end else - if dob.is=='verse' + if dob.is==:verse poem_structure(dob) - elsif dob.is=='group' + elsif dob.is==:group group_structure(dob) - elsif dob.is=='block' + elsif dob.is==:block block_structure(dob) - elsif dob.is=='code' + elsif dob.is==:code code_structure(dob) - elsif dob.is=='table' # FIX, check css, will need to modify + elsif dob.is==:table # FIX, check css, will need to modify table_structure(dob) - elsif dob.is =~ /^para/ \ + elsif dob.is ==:para \ and dob.indent.to_s =~/[1-9]/ \ and dob.bullet_==true xml_structure(dob,"indent_bullet#{dob.indent}") - elsif dob.is =~ /^para/ \ + elsif dob.is ==:para \ and dob.indent.to_s =~/[1-9]/ \ and dob.indent == dob.hang xml_structure(dob,"indent#{dob.indent}") - elsif dob.is =~ /^para/ \ + elsif dob.is ==:para \ and dob.hang.to_s =~/[0-9]/ \ and dob.indent != dob.hang xml_structure(dob,"hang#{dob.hang.to_s}_indent#{dob.indent.to_s}") |