aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-08-31 09:28:44 -0400
committerRalph Amissah <ralph@amissah.com>2010-08-31 09:29:32 -0400
commit0acd0addefed56f288d4ec464547a786e14ecfd7 (patch)
tree4a92c2041db9308bd34bca95ad30133712e149cc /lib
parentyml metadata, add subheading for a title (diff)
html headers do not include the "title" field, fix (Closes: #594949)
* param, variable not set (presumably since change from v1 to v2)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/param.rb36
1 files 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(/(<p>|<p \/>|<br>|<br \/>)/,'')
- @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(/(<p>|<p \/>|<br>|<br \/>)/,'')
+ 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(/(<p>|<p \/>|<br>|<br \/>)/,'')
- @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?