From 0acd0addefed56f288d4ec464547a786e14ecfd7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 31 Aug 2010 09:28:44 -0400 Subject: html headers do not include the "title" field, fix (Closes: #594949) * param, variable not set (presumably since change from v1 to v2) --- lib/sisu/v2/param.rb | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb index 674a0a08..59a6b02e 100644 --- a/lib/sisu/v2/param.rb +++ b/lib/sisu/v2/param.rb @@ -1018,23 +1018,22 @@ module SiSU_Param when /^3~/ @lvs[6]=1 end - if para =~ /^(?:1|:?A)~/ #% processing - if para=~/^:?A~/ + if para =~ /^:A~/ #% processing + if para=~/^:A~/ if @markup.nil? \ or @markup.empty? @markup=@markup_version.determined.to_s elsif @markup !~/0\.38/; @markup=@markup.strip + "; #{@markup_version.determined}" end end - if (para=~/^:?A~/ and @markup_version.determined >= 0.38) \ - or (para=~/^1~/ and @markup_version.determined < 0.38) - if @title.nil? - @title=para[/^:?[A1]~\S*(.+)$/m,1] - @html_title=@title.gsub(/(

|

|
|
)/,'') - @title.chomp!("\n") - @html_title.chomp!("\n") - SiSU_Screen::Ansi.new(@cmd,'Parameters',@html_title).txt_grey if @cmd =~/v/ + if para=~/^:A~/ + if not defined? @title.full.nil? + tf=para[/^:A~\S*(.+)$/m,1] + tf="@title: #{tf}" + @title=Md.new(tf.strip,@opt,@env).title end + @html_title=@title.full.gsub(/(

|

|
|
)/,'') + SiSU_Screen::Ansi.new(@cmd,'Parameters',@html_title).txt_grey if @cmd =~/v/ end end if not @book_idx \ @@ -1226,23 +1225,6 @@ module SiSU_Param if @author !~/[\S]/ SiSU_Screen::Ansi.new(@cmd,'Warning Document Author missing','please provide @creator: :author:').warn unless @cmd =~/q/ end - # Elementary Document Structure Analysis - adds complexity may remove - need to develop - appears to work, proof of concept - if @title.nil? - title_trigger=nil - fns_array.each do |para| - if para !~/@\S+:[+-]?\s/ \ - and para =~/\S/ \ - and title_trigger.nil? - @title=para[/(\S.+)/m,1] - @html_title=@title.gsub(/(

|

|
|
)/,'') - @title.chomp!("\n") - @html_title.chomp!("\n") - title_trigger=1 - SiSU_Screen::Ansi.new(@cmd,@html_title).txt_cyan unless @cmd =~/q/ - SiSU_Screen::Ansi.new(@cmd,'Parameters').txt_grey unless @cmd =~/q/ - end - end - end @struct={} doc_struct=Hash.new(0) if @lv1.nil? -- cgit v1.2.3