From 0fae8cd0ed8019f41ae4140b13c60e1d887754fd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 8 Feb 2010 21:28:12 -0500 Subject: html grouped text that is bulleted --- data/doc/sisu/v1/sisu_markup_samples/README | 6 ++++++ data/doc/sisu/v1/sisu_markup_samples/samples/README | 6 ------ lib/sisu/v1/html_scroll.rb | 11 +++++++++-- lib/sisu/v1/html_segments.rb | 7 +++++-- 4 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 data/doc/sisu/v1/sisu_markup_samples/README delete mode 100644 data/doc/sisu/v1/sisu_markup_samples/samples/README diff --git a/data/doc/sisu/v1/sisu_markup_samples/README b/data/doc/sisu/v1/sisu_markup_samples/README new file mode 100644 index 00000000..ef602a54 --- /dev/null +++ b/data/doc/sisu/v1/sisu_markup_samples/README @@ -0,0 +1,6 @@ +A few document markup samples, note that more can be found at +http://www.jus.uio.no/sisu +http://www.jus.uio.no/sisu/SiSU/2 + +"Free as in Freedom" on Richard Stallman by Sam Williams +was published under the GNU Free Documentation License diff --git a/data/doc/sisu/v1/sisu_markup_samples/samples/README b/data/doc/sisu/v1/sisu_markup_samples/samples/README deleted file mode 100644 index ef602a54..00000000 --- a/data/doc/sisu/v1/sisu_markup_samples/samples/README +++ /dev/null @@ -1,6 +0,0 @@ -A few document markup samples, note that more can be found at -http://www.jus.uio.no/sisu -http://www.jus.uio.no/sisu/SiSU/2 - -"Free as in Freedom" on Richard Stallman by Sam Williams -was published under the GNU Free Documentation License diff --git a/lib/sisu/v1/html_scroll.rb b/lib/sisu/v1/html_scroll.rb index 0cd34694..e4a14691 100644 --- a/lib/sisu/v1/html_scroll.rb +++ b/lib/sisu/v1/html_scroll.rb @@ -118,7 +118,12 @@ module SiSU_HTML_scroll when /^4:\S+?/; @sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 when /^5:\S*?/; @sto.scroll_lev_para_ocn.heading_body5 when /^6:\S*?/; @sto.scroll_lev_para_ocn.heading_body6 - when /^#{Mx[:gl_bullet]}/; @sto.scroll_lev_para_ocn.bullet + when /^#{Mx[:gl_bullet]}/ + if para =~/#{Mx[:gr_o]}group#{Mx[:gr_c]}/ + para.gsub!(/#{Mx[:gl_bullet]}/,'●  ') #watch + else + @sto.scroll_lev_para_ocn.bullet + end when /^#{Mx[:pa_o]}:i([1-9])#{Mx[:pa_c]}#{Mx[:gl_bullet]}/ #indent with bullet format_txt_obj.gsub_body @sto.scroll_lev_para_ocn.format('li',"i#{$1}") @@ -140,7 +145,9 @@ module SiSU_HTML_scroll end else para end - else para + else + para.gsub!(/#{Mx[:gl_bullet]}/,'●  ') #watch + para end elsif para =~/^#{Mx[:lv_o]}[1-9]:/ \ and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_c]}#@dp:#@dp#{Mx[:id_c]}$/ diff --git a/lib/sisu/v1/html_segments.rb b/lib/sisu/v1/html_segments.rb index 66e04800..2b54447a 100644 --- a/lib/sisu/v1/html_segments.rb +++ b/lib/sisu/v1/html_segments.rb @@ -354,7 +354,8 @@ module SiSU_HTML_seg para=format_seg.no_paranum end end - if para[/#{Mx[:id_o]}~(\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp)#{Mx[:id_c]}$/] + m=/#{Mx[:id_o]}~(\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp)#{Mx[:id_c]}$/ + if para =~m @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).html_seg if @sto.format =~/i[1-9]|ordinary/ #watch txt_obj={:txt =>@sto.text} @@ -393,7 +394,9 @@ module SiSU_HTML_seg @sto=nil table=SiSU_HTML_shared::Table.new(para) para=table.table - else @sto=nil + else + para.gsub!(/#{Mx[:gl_bullet]}/,'●  ') #watch + @sto=nil end if @md.flag_separate_endnotes para.gsub!(/"\s+href="#_(\d+)">/,%{" href=\"endnotes#{Sfx[:html]}#_\\1">}) #endnote- twice #removed file type -- cgit v1.2.3