aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/xml_dom.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/xml_dom.rb')
-rw-r--r--lib/sisu/v3/xml_dom.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb
index 22b11ebc..664bccdc 100644
--- a/lib/sisu/v3/xml_dom.rb
+++ b/lib/sisu/v3/xml_dom.rb
@@ -104,7 +104,7 @@ module SiSU_XML_DOM
def songsheet
begin
SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet
- SiSU_XML_DOM::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
+ SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
@@ -412,9 +412,15 @@ WOK
type="indent_bullet#{dob.indent.to_s}"
xml_markup(dob)
elsif dob.is=='para' \
- and dob.indent.to_s =~/[1-9]/
+ and dob.indent.to_s =~/[1-9]/ \
+ and dob.indent == dob.hang
type="indent#{dob.indent.to_s}"
xml_markup(dob)
+ elsif dob.is=='para' \
+ and dob.hang.to_s =~/[0-9]/ \
+ and dob.indent != dob.hang
+ type="hang#{dob.hang.to_s}_indent#{dob.indent.to_s}"
+ xml_markup(dob)
else
type='norm'
xml_markup(dob)
@@ -513,8 +519,8 @@ WOK
end
end
class Tidy
- def initialize(md,dir)
- @md,@env=md,dir
+ def initialize(md,file)
+ @md,@file=md,file
@prog=SiSU_Env::Info_program.new
end
def xml
@@ -524,7 +530,7 @@ WOK
tell=SiSU_Screen::Ansi.new(@md.opt.cmd,'invert','','')
tell.grey_open unless @md.opt.cmd =~/q/
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
- tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:dom]}",tidyfile)
+ tidy=SiSU_Env::System_call.new(@file,tidyfile)
tidy.well_formed?
tell.p_off unless @md.opt.cmd =~/q/
end