diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-08-18 23:41:37 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-08-18 23:41:37 -0400 |
commit | 5787bd8ec03e93e90dd90d5fbcb66bdb49a07a84 (patch) | |
tree | 960eb7142debcdd011307e946e87af2519cd472e /lib | |
parent | rsync, replace --delete-after with --delete (diff) |
a bit of a cleanup, and change reference to null to ordinary
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/html_format.rb | 67 | ||||
-rw-r--r-- | lib/sisu/v0/html_scroll.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v0/html_segments.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v0/manpage.rb | 19 | ||||
-rw-r--r-- | lib/sisu/v0/odf.rb | 20 | ||||
-rw-r--r-- | lib/sisu/v0/plaintext.rb | 19 | ||||
-rw-r--r-- | lib/sisu/v0/shared_structure.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v0/shared_txt.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v0/sst_to_s_xml_dom.rb | 21 | ||||
-rw-r--r-- | lib/sisu/v0/sst_to_s_xml_node.rb | 50 | ||||
-rw-r--r-- | lib/sisu/v0/sst_to_s_xml_sax.rb | 21 | ||||
-rw-r--r-- | lib/sisu/v0/wikispeak.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v0/xhtml.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v0/xml.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v0/xml_dom.rb | 2 |
15 files changed, 24 insertions, 216 deletions
diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 8fcd1e25..af36dc30 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -79,6 +79,9 @@ module SiSU_HTML_Format ocn_class='ocn_off' @paranum.gsub(/^(\d+|)$/, %{<label class="#{ocn_class}"> </label>}) + elsif @paranum.to_i == 0 + @paranum.gsub(/^(\d+|)$/, + %{<label class="#{ocn_class}"><a name="#@paranum"> </a></label>}) else ocn_class='ocn' @paranum.gsub(/^(\d+|)$/, @@ -798,51 +801,6 @@ WOK </tr></table>} end end - def toc_pre_next3 #used with seg_doc_types in seg_nav_band #with pdf & other doc types #knxjs - %{<table summary="segment navigation pre/next" border="0" cellpadding="3" cellspacing="0"> -<tr><td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker-1]}#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_prev}> - #{@vz.png_nav_previous} - </a> -</td> -<td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#@index#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_toc}> - #{@vz.png_nav_toc} - </a> -</td> -<td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_next}> - #{@vz.png_nav_next} - </a> -#{@vz.table_close}} - end - def toc_next3 #used with seg_doc_types in seg_nav_band #with pdf & other doc types #knxjs - %{<table summary="segment navigation next" border="0" cellpadding="3" cellspacing="0"> -<tr> -<td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#@index#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_toc}> - #{@vz.png_nav_toc} - </a> -</td> -<td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_next}> - #{@vz.png_nav_next} - </a> -#{@vz.table_close}} - end - def toc_pre3 #used with seg_doc_types in seg_nav_band #with pdf and other doc types #knxjs - # note endnotes is now two back, with insertion between end of text and metadata, but what happens where no endnote? - %{<table summary="segment navigation pre" border="0" cellpadding="3" cellspacing="0"> -<tr><td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_prev}> - #{@vz.png_nav_previous} - </a></td> -<td align="center" bgcolor=#{@vz.color_band1}> - <a href="#{@md.fnl[:pre]}#@index#{@md.fnl[:mid]}#@sfx#{@md.fnl[:post]}" target="_top" #{@vz.js_toc}> - #{@vz.png_nav_toc} - </a> -#{@vz.table_close}} - end def title_endnote(title,subtitle,creator,table_top_control) # %{#{@vz.banner_instrument_cover_band_seg} # <h1 class="banner"> @@ -1088,19 +1046,12 @@ WOK @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern rgx=/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})[\d*+]+\s+(.+?)#{Mx[:id_o]}#@dp#{Mx[:id_c]}(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/ #problem introduced @one_stripped=@one.gsub(rgx,'\1') if @one =~rgx #problem introduced - @link,@linkname=txt[0],txt[1] - @format,parablock=txt[0],txt[1] - @parablock=parablock - ##performance hit does not justify action: - #@parablock=if parablock=~/\S+/ and parablock !~/<!Th?ยก /um - # wrap=SiSU_text_utils::Wrap.new(parablock,70,4) - # wrap.line_wrap - #else parablock - #end + @format,@parablock=txt[0],txt[1] + @one.gsub!(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'') if @one + @parablock.gsub!(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'') if @parablock if txt[2]=~/\d+/ @paranum=txt[2][/(\d+)/m,1] # unless paranum =~/#/ @p_num=Paragraph_number.new(@md,@paranum) - #@p_num=SiSU_HTML_Format::Paragraph_number.new(@md,@paranum) @para_id=Paragraph_id_ocn.new(@md,@paranum) #used by table version end @headname='' @@ -1428,6 +1379,7 @@ WOK class Format_toc < Format_text_object def initialize(md='',*txt) super(md,*txt) + @link,@linkname=@one,@two end def links_guide #@three distinguishes between _top and external, can be used e.g. for different colour scheme @@ -1439,10 +1391,13 @@ WOK } end def lev(tag,attrib) - %{<#{tag} class="#{attrib}"> + if @one + %{<#{tag} class="#{attrib}"> #@one </#{tag}> } + else '' + end end def lev1 lev('h1','toc') diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index 93e30494..01720862 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -108,7 +108,7 @@ module SiSU_HTML_scroll @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_scroll m=/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch + format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ #watch case @sto.format when /^1:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body1 when /^2:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body2 @@ -127,7 +127,7 @@ module SiSU_HTML_scroll when /^(?:b|bold)$/; para=@sto.scroll_lev_para_ocn.bold when /^(?:verse|group|alt)$/; para=@sto.scroll_lev_para_ocn.para when /^code$/; para=@sto.scroll_lev_para_ocn.code - when /null/ # see whether u can improve + when /ordinary/ # see whether u can improve if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ format_txt_obj.gsub_body para=@sto.scroll_lev_para_ocn.para diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index db387105..7a4a4fb6 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -306,7 +306,7 @@ module SiSU_HTML_seg end if para[/#{Mx[:id_o]}~(\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp)#{Mx[:id_c]}$/] @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_seg - format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ #watch + format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ #watch para=case @sto.format # work area 2003w29 ||@|def lev_segname_para_ocn| when /^4:/; @sto.seg_lev_para_ocn.header4 # work on see Split_text_object when /^5:/; @sto.seg_lev_para_ocn.header5 @@ -323,7 +323,7 @@ module SiSU_HTML_seg @sto.seg_lev_para_ocn.para when /^code$/ @sto.seg_lev_para_ocn.code - when /null/ + when /ordinary/ if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ \ and para !~/^#{Mx[:gr_o]}TZ#{Mx[:gr_c]}/ format_txt_obj.gsub_body @@ -349,8 +349,6 @@ module SiSU_HTML_seg if para[/(.*)#{Mx[:id_o]}~0;(?:u|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/] #% watch u & m? one,two=$1,$2 format_seg=SiSU_HTML_Format::Format_seg.new(@md,one,two) -#FIX --> not that undefined, rather is not needed, should not be visited, and remove - #para=format_seg.seg_no_paranum #% undefined end para.gsub!(/\s*(-\{{2}~\d+|<:e[:_]\d+>).*/,'') #potentially dagerous - removes all paragraphs with <!e_!> #?? workpoint if para =~/<a name="_\d+" href="#-\d+"> <sup>/ #endnote- note- diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb index edbb55f9..fb6f6b2e 100644 --- a/lib/sisu/v0/manpage.rb +++ b/lib/sisu/v0/manpage.rb @@ -369,25 +369,6 @@ WOK when /^(6):(\S*)/ manpage_structure(para,$1,@sto.ocn,$2) @sto.lev_para_ocn.heading_body6 - #when /^(i1)$/ - # #formatMono.gsubBody - # #para=@sto[:lev_para_ocn].scrIndent1 - #when /^(i2)$/ - # formatMono.gsubBody - # para=@sto[:lev_para_ocn].scrIndent2 - #when /^(center)$/ - # para.gsub!(/(.+)/, - # %{<center>(\\1)</center>}) - # para=@sto[:lev_para_ocn].scrPara - #when /^(b|bold)$/ - # para.gsub!(/(.+)/, - # %{<b>(\\1)</b>}) - # para=@sto[:lev_para_ocn].scrPara - #when /null/ # see whether u can improve - # if (para !~/#{@margin.txt_0}|#{@margin.txt_1}|#{@margin.txt_2}/) - # #formatMono.gsubBody - # #para=@sto[:lev_para_ocn].scrPara - # end else manpage_structure(para,nil,nil,nil) #watch may be problematic para diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb index f3e3385f..9fb6b51e 100644 --- a/lib/sisu/v0/odf.rb +++ b/lib/sisu/v0/odf.rb @@ -533,26 +533,6 @@ module SiSU_ODF when /^(6):(\S*)/ odf_structure(para,$1,@sto.ocn,$2) para - #@sto.lev_para_ocn.heading_body6 - #when /^(i1)$/ - # #formatMono.gsubBody - # #para=@sto[:lev_para_ocn].scrIndent1 - #when /^(i2)$/ - # formatMono.gsubBody - # para=@sto[:lev_para_ocn].scrIndent2 - #when /^(center)$/ - # para.gsub!(/(.+)/, - # %{<center>(\\1)</center>}) - # para=@sto[:lev_para_ocn].scrPara - #when /^(b|bold)$/ - # para.gsub!(/(.+)/, - # %{<b>(\\1)</b>}) - # para=@sto[:lev_para_ocn].scrPara - #when /null/ # see whether u can improve - # if (para !~/#{@margin.txt_0}|#{@margin.txt_1}|#{@margin.txt_2}/) - # #formatMono.gsubBody - # #para=@sto[:lev_para_ocn].scrPara - # end else odf_structure(para,nil,nil,nil) #watch may be problematic para end diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb index 6378c2d5..9a246e49 100644 --- a/lib/sisu/v0/plaintext.rb +++ b/lib/sisu/v0/plaintext.rb @@ -360,25 +360,6 @@ WOK when /^(6):(\S*?)/ plaintext_structure(para,$1,@sto.ocn,$2) @sto.lev_para_ocn.heading_body6 - #when /^(i1)$/ - # #formatMono.gsubBody - # #para=@sto[:lev_para_ocn].scrIndent1 - #when /^(i2)$/ - # formatMono.gsubBody - # para=@sto[:lev_para_ocn].scrIndent2 - #when /^(center)$/ - # para.gsub!(/(.+)/, - # %{<center>(\\1)</center>}) - # para=@sto[:lev_para_ocn].scrPara - #when /^(b|bold)$/ - # para.gsub!(/(.+)/, - # %{<b>(\\1)</b>}) - # para=@sto[:lev_para_ocn].scrPara - #when /null/ # see whether u can improve - # if (para !~/#{@margin.txt_0}|#{@margin.txt_1}|#{@margin.txt_2}/) - # #formatMono.gsubBody - # #para=@sto[:lev_para_ocn].scrPara - # end else plaintext_structure(para,nil,nil,nil) #watch may be problematic para diff --git a/lib/sisu/v0/shared_structure.rb b/lib/sisu/v0/shared_structure.rb index 5a3993c6..cdfe9bf3 100644 --- a/lib/sisu/v0/shared_structure.rb +++ b/lib/sisu/v0/shared_structure.rb @@ -67,7 +67,7 @@ module SiSU_Structure attr_reader :format,:text,:ocn,:scroll_lev_para_ocn,:seg_lev_para_ocn,:lev_para_ocn def initialize(md,para) @md,@para=md,para - @format,@ocn='null','null' + @format,@ocn='ordinary','ordinary' #@format,@ocn=nil,nil @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern end diff --git a/lib/sisu/v0/shared_txt.rb b/lib/sisu/v0/shared_txt.rb index 484a5f05..41d6d815 100644 --- a/lib/sisu/v0/shared_txt.rb +++ b/lib/sisu/v0/shared_txt.rb @@ -228,8 +228,7 @@ module SiSU_text_parts_flatfile attr_reader :format,:text,:ocn,:lev_para_ocn def initialize(md,para) @md,@para=md,para - @format,@ocn='null','null' - #@format,@ocn=nil,nil + @format,@ocn='ordinary','ordinary' @@dl ||=SiSU_Env::Info_env.new.digest.length end def lev_segname_para_ocn diff --git a/lib/sisu/v0/sst_to_s_xml_dom.rb b/lib/sisu/v0/sst_to_s_xml_dom.rb index 5976d82b..efb60a88 100644 --- a/lib/sisu/v0/sst_to_s_xml_dom.rb +++ b/lib/sisu/v0/sst_to_s_xml_dom.rb @@ -386,7 +386,7 @@ WOK @sto=SiSU_text_parts::Split_text_object.new(@md,para).lev_segname_para unless @rcdc if para !~/^(?:%\s|0~|@\S+?:)/ - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[12]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[12]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_clean(para) @@ -412,25 +412,6 @@ WOK xml_clean(para) xml_structure($1,para,$2) para=@sto.lev_para_ocn.heading_body6 - #when /^(i1)$/i - # #format_scroll.gsubBody - # #para=@sto.lev_para_ocn.scrIndent1 - #when /^(i2)$/i - # format_scroll.gsubBody - # para=@sto.lev_para_ocn.scrIndent2 - #when /^(center)$/i - # para.gsub!(/(.+)/, - # %{<center>(\\1)</center>}) - # para=@sto.lev_para_ocn.scrPara - #when /^(b|bold)$/i - # para.gsub!(/(.+)/, - # %{<b>(\\1)</b>}) - # para=@sto.lev_para_ocn.scrPara - #when /null/ # see whether u can improve - # if (para !~/#{@margin.txt_0}|#{@margin.txt_1}|#{@margin.txt_2}/) - # #format_scroll.gsubBody - # #para=@sto.lev_para_ocn.scrPara - # end else if para =~ /<:verse>/ para=poem_structure(para) diff --git a/lib/sisu/v0/sst_to_s_xml_node.rb b/lib/sisu/v0/sst_to_s_xml_node.rb index ed7f4b10..d9451149 100644 --- a/lib/sisu/v0/sst_to_s_xml_node.rb +++ b/lib/sisu/v0/sst_to_s_xml_node.rb @@ -440,54 +440,6 @@ WOK end end end - #obj.each do |o| - # para=o.txt unless o.txt =~/^%% / #comments are lost, consider - # if para - # para.gsub!(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'<i>\1</i>') - # para.gsub!(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'<b>\1</b>') - # para.gsub!(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'<u>\1</u>') - # para.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'<del>\1</del>') - # para.gsub!(/#{Mx[:br_line]}|#{Mx[:br_paragraph]}/,'<br />') - # if @rcdc==false \ - # and (para =~/~metadata/ or para =~/^1~meta\s+Document Information/) - # if para !~/(^0~|^@\S+?:|^\s*$|<ENDNOTES>|<EOF>)/ - # @rcdc=true - # end - # @sto=SiSU_text_parts::Split_text_object.new(@md,para).lev_segname_para - # unless @rcdc - # format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[12]|null/ - # case @sto.format - # when /^(1):(\S*)/ - # node_structure(o,para,$1,$2) - # when /^(2):(\S*)/ - # node_structure(o,para,$1,$2) - # when /^(3):(\S*)/ - # node_structure(o,para,$1,$2) - # when /^(4):(\S*)/ # work on see Split_text_object - # node_structure(o,para,$1,$2) - # when /^(5):(\S*)/ - # node_structure(o,para,$1,$2) - # when /^(6):(\S*)/ - # node_structure(o,para,$1,$2) - # else - # if para =~ /<:verse>/ - # node_structure(o,para) - # elsif para =~ /<:group>/ - # node_structure(o,para) - # elsif para =~ /<:code>/ - # node_structure(o,para) - # elsif para =~/<!Th?.+/ # tables come as single block #work area 2005w13 - # #elsif para =~/#{Mx[:gr_o]}Th?.+/ # tables come as single block #work area 2005w13 - # table=SiSU_Tables::Table_xml.new(para) - # para=table.table_split - # node_structure(o,para) - # else node_structure(o,para,nil,nil) - # end - # end - # end - # end - # end - #end obj.each do |o| para=o.txt unless o.txt =~/^%% / #comments are lost, consider if para @@ -504,7 +456,7 @@ WOK if para !~/(^0~|^@\S+?:|^\s*$|<ENDNOTES>|<EOF>)/ @sto=SiSU_text_parts::Split_text_object.new(@md,para).lev_segname_para unless @rcdc - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[12]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[12]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_clean(para) diff --git a/lib/sisu/v0/sst_to_s_xml_sax.rb b/lib/sisu/v0/sst_to_s_xml_sax.rb index 4b3ca7c8..e6864405 100644 --- a/lib/sisu/v0/sst_to_s_xml_sax.rb +++ b/lib/sisu/v0/sst_to_s_xml_sax.rb @@ -293,7 +293,7 @@ WOK if para !~/(^0~|^@\S+?:|^\s*$|<ENDNOTES>|<EOF>)/ @sto=SiSU_text_parts::Split_text_object.new(@md,para).lev_segname_para unless @rcdc - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_clean(para) @@ -319,25 +319,6 @@ WOK xml_clean(para) xml_structure(para,$1,$2) para=@sto.lev_para_ocn.heading_body6 - #when /^(i1)$/i - # #format_scroll.gsubBody - # #para=@sto[:lev_para_ocn].scrIndent1 - #when /^(i2)$/i - # format_scroll.gsubBody - # para=@sto[:lev_para_ocn].scrIndent2 - #when /^(center)$/i - # para.gsub!(/(.+)/, - # %{<center>(\\1)</center>}) - # para=@sto[:lev_para_ocn].scrPara - #when /^(b|bold)$/i - # para.gsub!(/(.+)/, - # %{<b>(\\1)</b>}) - # para=@sto[:lev_para_ocn].scrPara - #when /null/ # see whether u can improve - # if (para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/) - # #format_scroll.gsubBody - # #para=@sto[:lev_para_ocn].scrPara - # end else if para =~ /<:verse>/ para=poem_structure(para) diff --git a/lib/sisu/v0/wikispeak.rb b/lib/sisu/v0/wikispeak.rb index 2b0ba560..0e8d3989 100644 --- a/lib/sisu/v0/wikispeak.rb +++ b/lib/sisu/v0/wikispeak.rb @@ -105,7 +105,7 @@ module SiSU_Wikispeak attr_reader :format,:lev,:text,:ocn,:lev_para_ocn def initialize(para) @para=para - @format,@ocn='null','null' + @format,@ocn='ordinary','ordinary' @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern end def lev_segname_para_ocn diff --git a/lib/sisu/v0/xhtml.rb b/lib/sisu/v0/xhtml.rb index 067ed8a8..593d26c4 100644 --- a/lib/sisu/v0/xhtml.rb +++ b/lib/sisu/v0/xhtml.rb @@ -289,7 +289,7 @@ WOK unless @rcdc m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_structure(para,$1,@sto.ocn,$2) diff --git a/lib/sisu/v0/xml.rb b/lib/sisu/v0/xml.rb index 9f897266..2531a962 100644 --- a/lib/sisu/v0/xml.rb +++ b/lib/sisu/v0/xml.rb @@ -313,7 +313,7 @@ WOK unless @rcdc m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_structure(para,$1,@sto.ocn,$2) diff --git a/lib/sisu/v0/xml_dom.rb b/lib/sisu/v0/xml_dom.rb index 9bcb15ec..38ba0a87 100644 --- a/lib/sisu/v0/xml_dom.rb +++ b/lib/sisu/v0/xml_dom.rb @@ -371,7 +371,7 @@ WOK unless @rcdc m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_markup(para) |