[ANN] RedCloth 3.0.1 -- Humane Text for Ruby

Discussion in 'Ruby' started by why the lucky stiff, Jan 19, 2005.

  1. RedCloth 3 lumbers along.

    RedCloth is a Ruby library for writing stylized text which can be
    converted into HTML. The parser includes built-in Textile and limited
    Markdown support.

    This release is a maintenance release. Fixed some stack overflows on
    regular expressions, relaxed parsing of emphasis tokens, and improved
    use of <notextile> tags. Be aware, there are still some known overflows
    and wierdnesses. If you're looking for stability, I'd stick with 2.0.11
    until 3.1 comes out.

    _why
    why the lucky stiff, Jan 19, 2005
    #1
    1. Advertising

  2. why the lucky stiff wrote:

    > RedCloth 3 lumbers along.


    I keep withholding information. Sorry.
    <http://whytheluckystiff.net/ruby/redcloth/>

    _why
    why the lucky stiff, Jan 19, 2005
    #2
    1. Advertising

  3. why the lucky stiff

    Bil Kleb Guest

    why the lucky stiff wrote:
    > RedCloth 3 lumbers along.


    Excellent news. Thank you.

    > If you're looking for stability, I'd stick with 2.0.11
    > until 3.1 comes out.


    /usr/local/pkgs/ruby-1.8.2/lib/ruby/gems/1.8/gems/RedCloth-3.0.1/lib/redcloth.rb:571:in `gsub!': Stack overflow in regexp matcher: /((?:^([#*> ])(?:[^\n]|\n+(?:\2|>)|\n(?!\n|\Z))+))|((?:[^\n]+|\n+ +|\n(?![#*\n]|\Z))+)/m (RegexpError)
    from /usr/local/pkgs/ruby-1.8.2/lib/ruby/gems/1.8/gems/RedCloth-3.0.1/lib/redcloth.rb:571:in `blocks'

    Standing by at 2.0.11,
    --
    Bil Kleb, Hampton, Virginia
    http://fun3d.larc.nasa.gov
    Bil Kleb, Jan 19, 2005
    #3
  4. Bil Kleb wrote:

    > Standing by at 2.0.11,


    On the other hand, RedCloth 3 fixes a number of interesting rendering
    bugs with punctuation and hyphens rendering.

    For example, try to feed both versions with this:

    * "a~": b
    * "c": ~d

    and you'll know what I am talking about.

    Dear Why, a stable 3.X release is exactly what the progressive humankind
    needs.

    --
    Best regards,

    Alexey Verkhovsky

    Ruby Forum: http://ruby-forum.org (moderator)
    RForum: http://rforum.andreas-s.net (co-author)
    Instiki: http://instiki.org (maintainer)
    Alexey Verkhovsky, Jan 19, 2005
    #4
  5. Alexey Verkhovsky () wrote:
    > Dear Why, a stable 3.X release is exactly what the progressive humankind
    > needs.


    Believe me when I say that I am just as vested as you are in wanting this.
    My book, my notes, my blogs. All wrapped up in this stuff.

    _why
    why the lucky stiff, Jan 19, 2005
    #5
  6. why the lucky stiff

    Bil Kleb Guest

    why the lucky stiff wrote:
    > RedCloth 3 lumbers along.


    FWIW, I was running with Ruby's -w tonight and came up with
    the patch following my sig to quiet things down (and repair
    a couple typos).

    I'll try to come up with some test cases that demonstrate
    my particular breed of stack overflows.

    BTW: several tests do not pass for this release? (Most failures
    seem to be related to newline treatment.)

    Regards,
    --
    Bil Kleb, Hampton, Virginia
    http://fun3d.larc.nasa.gov


    $ diff -Naur redcloth-3.0.1.rb redcloth.rb
    --- redcloth-3.0.1.rb 2005-01-20 15:48:04.000000000 -0500
    +++ redcloth.rb 2005-01-20 18:15:10.000000000 -0500
    @@ -133,7 +133,7 @@
    #
    # == Adding Tables
    #
    -# In Textile, simple tables can be added by seperating each column by
    +# In Textile, simple tables can be added by separating each column by
    # a pipe.
    #
    # |a|simple|table|row|
    @@ -194,7 +194,7 @@
    attr_accessor :hard_breaks

    #
    - # Establishes the markup predence. Available rules include:
    + # Establishes the markup precedence. Available rules include:
    #
    # == Textile Rules
    #
    @@ -230,6 +230,7 @@
    # #=>"<h1>A &lt;b&gt;bold&lt;/b&gt; man</h1>"
    #
    def initialize( string, restrictions = [] )
    + @filter_html = @filter_styles = nil
    restrictions.each { |r| method( "#{ r }=" ).call( true ) }
    super( string )
    end
    @@ -594,7 +595,7 @@

    block_applied = nil
    @rules.each do |rule_name|
    - break if block_applied = ( rule_name.to_s.match /^block_/ and method( rule_name ).call( blk ) )
    + break if block_applied = ( rule_name.to_s.match(/^block_/) and method( rule_name ).call( blk ) )
    end
    unless block_applied
    if deep_code
    @@ -704,9 +705,6 @@
    def block_markdown_lists( text )
    end

    - def inline_markdown_link( text )
    - end
    -
    def inline_textile_span( text )
    text.gsub!( QTAGS_RE_1 ) do |m|

    @@ -818,7 +816,7 @@

    def refs( text )
    @rules.each do |rule_name|
    - method( rule_name ).call( text ) if rule_name.to_s.match /^refs_/
    + method( rule_name ).call( text ) if rule_name.to_s.match( /^refs_/ )
    end
    end

    @@ -1022,7 +1020,7 @@

    def inline( text )
    @rules.each do |rule_name|
    - method( rule_name ).call( text ) if rule_name.to_s.match /^inline_/
    + method( rule_name ).call( text ) if rule_name.to_s.match( /^inline_/ )
    end
    end
    Bil Kleb, Jan 21, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. why the lucky stiff
    Replies:
    0
    Views:
    109
    why the lucky stiff
    Feb 6, 2004
  2. why the lucky stiff
    Replies:
    0
    Views:
    93
    why the lucky stiff
    Apr 2, 2004
  3. why the lucky stiff
    Replies:
    0
    Views:
    95
    why the lucky stiff
    Apr 8, 2004
  4. why the lucky stiff
    Replies:
    0
    Views:
    102
    why the lucky stiff
    Apr 14, 2004
  5. why the lucky stiff

    [ANN] RedCloth 3.0.4 -- Humane Text for Ruby

    why the lucky stiff, Sep 15, 2005, in forum: Ruby
    Replies:
    0
    Views:
    81
    why the lucky stiff
    Sep 15, 2005
Loading...

Share This Page