diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-01-06 23:05:26 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-01-06 23:05:26 -0500 |
commit | 4075d476731a7a1c29e399d60f6baa210f3d1cb4 (patch) | |
tree | b0fab3d856f64f0562b7b7da317cf79c3b3e05f1 /lib/sisu/v5/txt_textile.rb | |
parent | debian/changelog (4.2.16-1) (diff) | |
parent | v5: heading recalibration, code (downstream) changes (diff) |
Merge tag 'sisu_4.2.17' into debian/sid
SiSU 4.2.17
Diffstat (limited to 'lib/sisu/v5/txt_textile.rb')
-rw-r--r-- | lib/sisu/v5/txt_textile.rb | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/sisu/v5/txt_textile.rb b/lib/sisu/v5/txt_textile.rb index 429593cc..5645f490 100644 --- a/lib/sisu/v5/txt_textile.rb +++ b/lib/sisu/v5/txt_textile.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: @@ -126,9 +127,9 @@ module SiSU_Txt_Textile @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,22 +221,22 @@ WOK def decorate def heading def inline - def l1 + def l0 'h1. ' end - def l2 + def l1 'h2. ' end - def l3 + def l2 'h3. ' end - def l4 + def l3 'h4. ' end - def l5 + def l4 'h5. ' end - def l6 + def l5 'h6. ' end self @@ -345,12 +346,12 @@ WOK end def heading_decorated_inline(dob) heading_inline = case dob.lc - when 1; decorate.heading.inline.l1 - when 2; decorate.heading.inline.l2 - when 3; decorate.heading.inline.l3 - when 4; decorate.heading.inline.l4 - when 5; decorate.heading.inline.l5 - when 6; decorate.heading.inline.l6 + when 1 then decorate.heading.inline.l1 + when 2 then decorate.heading.inline.l2 + when 3 then decorate.heading.inline.l3 + when 4 then decorate.heading.inline.l4 + when 5 then decorate.heading.inline.l5 + when 6 then decorate.heading.inline.l6 end heading_inline + ' ' + dob.obj end |