aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/txt_plain.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/txt_plain.rb')
-rw-r--r--lib/sisu/v5/txt_plain.rb27
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/sisu/v5/txt_plain.rb b/lib/sisu/v5/txt_plain.rb
index 0cd50254..ca944a1f 100644
--- a/lib/sisu/v5/txt_plain.rb
+++ b/lib/sisu/v5/txt_plain.rb
@@ -8,7 +8,8 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
+ All Rights Reserved.
* License: GPL 3 or later:
@@ -127,9 +128,9 @@ module SiSU_Txt_Plain
@brace_url=SiSU_Viz::Defaults.new.url_decoration
@tab="\t"
@@endnotes_=case md.opt.mod.inspect
- when /--footnote/; false
- when /--endnote/; true
- else true
+ when /--footnote/ then false
+ when /--endnote/ then true
+ else true
end
@plaintext={ body: [], open: [], close: [], head: [], metadata: [], tail: [] }
end
@@ -220,11 +221,14 @@ WOK
end
def decorate
def heading_underscore
+ def l0
+ '='
+ end
def l1
'*'
end
def l2
- '='
+ '+'
end
def l3
'~'
@@ -376,12 +380,13 @@ WOK
times=wrapped.length
times=@wrap_width if times > @wrap_width
@plaintext[:body] << case lv
- when 1; wrapped.upcase << break_line << decorate.heading_underscore.l1*times + p_num << break_line*2
- when 2; wrapped.upcase << break_line << decorate.heading_underscore.l2*times + p_num << break_line*2
- when 3; wrapped.upcase << break_line << decorate.heading_underscore.l3*times + p_num << break_line*2
- when 4; wrapped.upcase << break_line << decorate.heading_underscore.l4*times + p_num << break_line*2
- when 5; wrapped.upcase << break_line << decorate.heading_underscore.l5*times + p_num << break_line*2
- when 6; wrapped.upcase << break_line << decorate.heading_underscore.l6*times + p_num << break_line*2
+ when 0 then wrapped.upcase << break_line << decorate.heading_underscore.l0*times + p_num << break_line*2
+ when 1 then wrapped.upcase << break_line << decorate.heading_underscore.l1*times + p_num << break_line*2
+ when 2 then wrapped.upcase << break_line << decorate.heading_underscore.l2*times + p_num << break_line*2
+ when 3 then wrapped.upcase << break_line << decorate.heading_underscore.l3*times + p_num << break_line*2
+ when 4 then wrapped.upcase << break_line << decorate.heading_underscore.l4*times + p_num << break_line*2
+ when 5 then wrapped.upcase << break_line << decorate.heading_underscore.l5*times + p_num << break_line*2
+ when 6 then wrapped.upcase << break_line << decorate.heading_underscore.l6*times + p_num << break_line*2
end
else
@plaintext[:body] << wrapped + p_num << break_line # main text, contents, body KEEP