From: Bil Kleb Date: 2005-01-21T09:36:00+09:00 Subject: Re: [ANN] RedCloth 3.0.1 -- Humane Text for Ruby 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 @@ # #=>"

A <b>bold</b> man

" # 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