aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/sst_identify_markup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/sst_identify_markup.rb')
-rw-r--r--lib/sisu/v0/sst_identify_markup.rb22
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/sisu/v0/sst_identify_markup.rb b/lib/sisu/v0/sst_identify_markup.rb
index e7a3c9eb..19601c13 100644
--- a/lib/sisu/v0/sst_identify_markup.rb
+++ b/lib/sisu/v0/sst_identify_markup.rb
@@ -107,13 +107,19 @@ WOK
elsif cont[0] =~ /^(?:%\s+)?SiSU\s+([0-9](?:\.[0-9]+){1,2})/ or cont[0] =~ /^(?:%\s+)?sisu-([0-9](?:\.[0-9]+){1,2})/
@declared_markup=$1
end
- @flag_38=false
+ @flag_57,@flag_38=false,false
cont.each_with_index do |y,i|
if y =~/^(?:0\{?~links?|@links?:)\s/ and f =~/(?:\.sst|\.ssm|\.ssi|\.s[123])/
links=unless y =~/\{.+?\}\S+/; oldlinks=' (pre 0.20.4 header links)'
else ' (post 0.20.4 header links)'
end
end
+ if @flag_57 or y =~/^:?A~\?? @title/
+ version='0.57'
+ markup=Markup_inform.new(version,'0.57' + oldlinks,@declared_markup,@declared_type)
+ @flag_57=true
+ break
+ end
if @flag_38 or (y =~/^:?A~/ and f =~/(?:\.sst|\.ssm|\.ssi)/)
version='0.38'
markup=Markup_inform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type)
@@ -196,6 +202,16 @@ WOK
def initialize(opt)
@opt=opt
end
+ def sisu_0_57
+ <<WOK
+ SiSU 0.57 is the same as 0.42 with the introduction of some a shortcut to use
+ the headers @title and @creator in the first heading [expanded using the
+ contents of the headers @title: and @author:]
+
+ :A~ @title by @author
+
+WOK
+ end
def sisu_0_42
<<WOK
SiSU 0.42 is the same as 0.38 with the introduction of some additional endnote types,
@@ -300,7 +316,9 @@ WOK
tell=if @opt.mod.inspect =~/--query/
tell=case @opt.mod.inspect
when /history/
- "#{sisu_0_38}\n#{sisu_0_37}\n#{sisu_0_16}\n#{sisu_0_1}"
+ "#{sisu_0_57}#{sisu_0_42}#{sisu_0_38}\n#{sisu_0_37}\n#{sisu_0_16}\n#{sisu_0_1}"
+ when /0.57/
+ "#{sisu_0_57}#{sisu_0_42}#{sisu_0_38}#{sisu_0_16}"
when /0.42/
"#{sisu_0_42}#{sisu_0_38}#{sisu_0_16}"
when /0.38/