From 452f2c20ea361d68e7533f2bd45a6d5b215ed700 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 19 Sep 2008 19:03:07 -0400 Subject: sample sisu markup "Free as in Freedom": book index markers included, and; identify markup helpers updated * sample sisu markup "Free as in Freedom": book index markers included * identify markup helpers updated --- lib/sisu/v0/param_identify_markup.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v0/param_identify_markup.rb') diff --git a/lib/sisu/v0/param_identify_markup.rb b/lib/sisu/v0/param_identify_markup.rb index 056fcc49..e86e51cd 100644 --- a/lib/sisu/v0/param_identify_markup.rb +++ b/lib/sisu/v0/param_identify_markup.rb @@ -77,7 +77,7 @@ module SiSU_Markup_type or @cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/ @version_declared=$1 end - @flat_66,@flag_57,@flag_38=false,false,false + @flag_66,@flag_57,@flag_38=false,false,false @cont.each_with_index do |y,i| if y =~/^(?:0\{?~links?|@links?:)\s/ links=unless y =~/\{.+?\}\S+/; oldlinks=' (pre 0.20.4 header links)' @@ -86,23 +86,30 @@ module SiSU_Markup_type end unless @flag_38 if y =~/^:?A~/ - version='0.38' + version=0.38 @version_determined=version @flag_38=true end end if @flag_38 + if @flag_69 \ + or y =~/^=\{.+?\}\s*$/ + version=0.69 + @flag_69=true + @version_determined=version + break + end if @flag_66 \ or y =~/[:;]\{.+?\}[:;][a-z+]/ version='0.66' - @version_determined=version @flag_66=true + @version_determined=version break end end end @flag_57,@flag_38=false,false - unless @flag_66 + unless @flag_66 or @flag_69 @cont.each_with_index do |y,i| if @flag_57 \ or y =~/^:?A~\?? @title/ -- cgit v1.2.3