From e1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 15 Oct 2007 19:27:16 +0100 Subject: mostly the arrangement of conditionals --- lib/sisu/v0/param_identify_markup.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 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 fcdf71cb..a5e74aa4 100644 --- a/lib/sisu/v0/param_identify_markup.rb +++ b/lib/sisu/v0/param_identify_markup.rb @@ -66,19 +66,23 @@ module SiSU_Markup_type def identify @version_determined,@version_declared,@declared_doc_type=@@version_determined,@@version_declared,@@declared_doc_type if @opt.fns != @@fns - if @cont[0] =~ /^(?:%\s+)?SiSU\s+(text|master|insert)\s+([0-9](?:\.[0-9]+){1,2})/ or @cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/ + if @cont[0] =~ /^(?:%\s+)?SiSU\s+(text|master|insert)\s+([0-9](?:\.[0-9]+){1,2})/ \ + or @cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/ @declared_doc_type,@version_declared=$1,$2 - elsif @cont[0] =~ /^(?:%\s+)?SiSU\s+([0-9](?:\.[0-9]+){1,2})/ or @cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/ + elsif @cont[0] =~ /^(?:%\s+)?SiSU\s+([0-9](?:\.[0-9]+){1,2})/ \ + or @cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/ @version_declared=$1 end @flag_57,@flag_38=false,false @cont.each_with_index do |y,i| - if @flag_57 or y =~/^:?A~\?? @title/ + if @flag_57 \ + or y =~/^:?A~\?? @title/ @version_determined=0.57 @flag_57=true break end - if @flag_38 or y =~/^:?A~/ + if @flag_38 \ + or y =~/^:?A~/ @version_determined=0.38 @flag_38=true break if i >= 200 @@ -87,7 +91,8 @@ module SiSU_Markup_type break end end - if y =~/^0~/ and not @flag_38 + if y =~/^0~/ \ + and not @flag_38 @version_determined=0.16 break end -- cgit v1.2.3