diff options
Diffstat (limited to 'lib/sisu/v0/sst_identify_markup.rb')
-rw-r--r-- | lib/sisu/v0/sst_identify_markup.rb | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/lib/sisu/v0/sst_identify_markup.rb b/lib/sisu/v0/sst_identify_markup.rb index a9eb4d32..3fbac3f3 100644 --- a/lib/sisu/v0/sst_identify_markup.rb +++ b/lib/sisu/v0/sst_identify_markup.rb @@ -114,7 +114,7 @@ WOK or cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/ @declared_markup=$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/ \ and f =~/(?:\.sst|\.ssm|\.ssi|\.s[123])/ @@ -130,6 +130,13 @@ WOK end end if @flag_38 + if @flag_69 \ + or y =~/^=\{.+?\}\s*$/ + version='0.69' + markup=Markup_inform.new(version,'0.69' + oldlinks,@declared_markup,@declared_type) + @flag_69=true + break + end if @flag_66 \ or y =~/[a-z+][:;]\{.+?\}[:;][a-z+]/ version='0.66' @@ -139,7 +146,7 @@ WOK end end end - unless @flag_66 + unless @flag_66 or @flag_69 cont.each_with_index do |y,i| if y =~/^(?:0\{?~links?|@links?:)\s/ \ and f =~/(?:\.sst|\.ssm|\.ssi|\.s[123])/ @@ -245,6 +252,22 @@ WOK def initialize(opt) @opt=opt end + def sisu_0_69 + <<WOK + SiSU 0.69 same as previous, adds book index tags + /^=\{.+?\}$/ + e.g. appended to a paragraph, on a new-line (without a blank line in between) + logical structure produced assuming this is the first text "object" + ={GNU/Linux community distribution:Debian+2|Fedora|Gentoo;Free Software Foundation+5} + + Free Software Foundation, 1-6 + GNU/Linux community distribution, 1 + Debian, 1-3 + Fedora, 1 + Gentoo, + +WOK + end def sisu_0_66 <<WOK SiSU 0.66 same as previous, adds semantic tags @@ -375,7 +398,9 @@ WOK tell=if @opt.mod.inspect =~/--query/ tell=case @opt.mod.inspect when /history/ - "#{sisu_0_66}#{sisu_0_57}#{sisu_0_42}#{sisu_0_38}\n#{sisu_0_37}\n#{sisu_0_16}\n#{sisu_0_1}" + "#{sisu_0_69}#{sisu_0_66}#{sisu_0_57}#{sisu_0_42}#{sisu_0_38}\n#{sisu_0_37}\n#{sisu_0_16}\n#{sisu_0_1}" + when /0.69/ + "#{sisu_0_69}#{sisu_0_66}#{sisu_0_57}#{sisu_0_42}#{sisu_0_38}#{sisu_0_16}" when /0.66/ "#{sisu_0_66}#{sisu_0_57}#{sisu_0_42}#{sisu_0_38}#{sisu_0_16}" when /0.65/ |