diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-04-30 19:52:57 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-04-30 19:52:57 -0400 |
commit | 88029687c9ad611c1f2c70f789347605dc2041c3 (patch) | |
tree | 946d9070e224868df464da3112a5fc94200a759c /lib/sisu/v2/param.rb | |
parent | markup for *{emphasis}* configurable as being either bold or italics (diff) |
emphasis display and plaintext line wrap configurable in document or sis
* markup for *{emphasis}* configurable as being displayed either bold or
italics, the default is that emphasis output is in bold so there is no
at present unless configured, either in sisurc.yml (default: emphasis:
'italics'), or the markup source document header @make: :emphasis: 'it
[requested]
* plaintext, wrap width configurable between 20 to 200 characters, the
default width being 78, configuration eithe rin sisurc.yml (default: t
78), or the markup source document header (@make: :plaintext_wrap: 78)
Diffstat (limited to 'lib/sisu/v2/param.rb')
-rw-r--r-- | lib/sisu/v2/param.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb index a59ac8ff..fc24501a 100644 --- a/lib/sisu/v2/param.rb +++ b/lib/sisu/v2/param.rb @@ -657,6 +657,19 @@ module SiSU_Param y=((x =~/i/) ? (/#{rgx}/i) : (/#{rgx}/)) { :str =>'\b(?:' + m + ')\b', :regx => y } end + def emphasis + (@h['emphasis'] =~/italics?/) \ + ? 'italics' \ + : 'bold' + end + def plaintext_wrap + if @h['plaintext_wrap'].to_s =~/\d\d+/ \ + and @h['plaintext_wrap'].to_i > 19 \ + and @h['plaintext_wrap'].to_i < 201 + @h['plaintext_wrap'].to_i + else nil + end + end def skin @h['skin'] end |