Minor bug in RedCloth (?)

M

Martin Hart

Hi all,

just had RedCloth barf on me with a fairly large document and a bullet list at
the end of it. The error was "Exception `NoMethodError' at
/usr/local/lib/ruby/site_ruby/1.8/redcloth.rb:376 - private method `gsub'
called for nil:NilClass"

Changing line 376 of redcloth.rb from:

nl = nextline.gsub( /^([#*]+)\s.*/, '\1' )

to:

nl = (nextline || "").gsub( /^([#*]+)\s.*/, '\1' )

seems to fix the problem - although i have not investigated any further than
that.

Cheers,
Martin

--
Martin Hart
Arnclan Limited
53 Union Street
Dunstable, Beds
LU6 1EX
http://www.arnclan.com
 
W

why the lucky stiff

Martin said:
just had RedCloth barf on me with a fairly large document and a bullet list at
the end of it. The error was "Exception `NoMethodError' at
/usr/local/lib/ruby/site_ruby/1.8/redcloth.rb:376 - private method `gsub'
called for nil:NilClass"

hi martin. sorry bout the bug.

say, do you want to try checking out from redcloth cvs? a number of
bugs have been fixed over the past few weeks (including the one you just
mentioned). give it a whirl, i'm hoping to push out a new version
when... when... we'll just say next week.

cvs -d:pserver:[email protected]:/cvsroot/yaml4r login
cvs -z3 -d:pserver:[email protected]:/cvsroot/yaml4r co \
redcloth

_why
 
M

Martin Hart

say, do you want to try checking out from redcloth cvs? a number of
bugs have been fixed over the past few weeks (including the one you just
mentioned). give it a whirl, i'm hoping to push out a new version
when... when... we'll just say next week.

thanks - i have done so and it looks good.

Cheers,
Martin
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top