public
Description: Converts text formatted with an exceedingly simple markup language into XHTML - perfect for comments on your blog.
Homepage: http://lesstile.rubyforge.org
Clone URL: git://github.com/xaviershay/lesstile.git
name age message
file .gitignore Tue Oct 27 18:55:52 -0700 2009 Use Jeweler instead of Hoe, push new gem to gem... [xaviershay]
file History.txt Thu Apr 17 01:43:06 -0700 2008 0.3 release [xaviershay]
file Manifest.txt Thu Apr 17 01:05:05 -0700 2008 Import of r4 from rubyforge [xaviershay]
file README.txt Fri Jun 19 23:48:49 -0700 2009 1.9 tested [xaviershay]
file Rakefile Tue Oct 27 18:56:43 -0700 2009 Make spec the default rake task, remove env spe... [xaviershay]
file VERSION Tue Oct 27 18:55:52 -0700 2009 Use Jeweler instead of Hoe, push new gem to gem... [xaviershay]
directory lib/ Tue Jul 14 07:20:23 -0700 2009 Made the code detection regex slightly more len... [bjeanes]
directory spec/ Tue Jul 14 07:20:23 -0700 2009 Made the code detection regex slightly more len... [bjeanes]
README.txt
= lesstile
by Xavier Shay (http://rhnh.net)

== DESCRIPTION:
  
Converts text formatted with an exceedingly simple markup language into XHTML (iron clad guarantee!) - perfect for 
comments on your blog. Textile isn't good for this because not only does it do too much (do commenters really need 
subscript?), but it can also output invalid HTML (try a <b> tag over multiple lines...). Whitelisting HTML is another 
option, but you still need some sort of parsing if you want syntax highlighting.

Integrates with CodeRay for sexy syntax highlighting.

== SYNOPSIS:

  comment = <<-EOS
  "Ego Link":http://rhnh.net
  Wow, this post is awesome. I'd implement it like this:

  --- Ruby
  def hello_world
    puts "hello world!"
  end
  ---

  --- HTML
  <strong>Look, HTML code</strong>
  ---

  ---
  just some normal code
  ---
  EOS

  Lesstile.format_as_xhtml(comment)
  Lesstile.format_as_xhtml(comment, :code_formatter => Lesstile::CodeRayFormatter) # Requires code ray
  Lesstile.format_as_xhtml(comment, :code_formatter => lambda {|code, lang| "Code in #{lang}: #{code}" })

== REQUIREMENTS:

* CodeRay (optional)

== INSTALL (pick one):

  sudo gem install lesstile                          # gem install
  git clone git://github.com/xaviershay/lesstile.git # go from source

Tested on ruby 1.8.6-339, 1.8.7-160 and 1.9.1-rc2

== LICENSE:

(The MIT License)

Copyright (c) 2007 Xavier Shay

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.