From: trans Date: 2009-09-05T09:59:53+09:00 Subject: Re: Better RDoc Inline Markup On Sep 4, 3:05 pm, Eric Hodel wrote: > On Sep 3, 2009, at 08:16, Intransition wrote: > > > > > RDoc's SimpleMarkup  doesn't catch all the cases of  inline markup > > that is really useful for a Ruby documentation. I think it's checking > > for \w+ only, but adding some other punctuation marks would be > > helpful. Namely, none of the following work b/c of punctuation marks: > > >  +ActiveRecord::Base+ > > >  +merge!+ > > >  +is_a?+ > > >  +name=+ > > >  +object.call+ > > > It would great if the Regexp could be expanded to catch these cases. > > Wait, did you even try it? > > $ echo '+ActiveRecord::Base+ +merge!+ +is_a?+ +name=+ +object.call+   > +:symbol+' | rdoc --pipe >

> +ActiveRecord::Base+ merge! is_a? name= > object.call :symbol >

Hmmm... require 'rdoc/markup/simple_markup' require 'rdoc/markup/simple_markup/to_html' p = SM::SimpleMarkup.new h = SM::ToHtml.new puts p.convert('+ActiveRecord::Base+ +merge!+ +is_a?+ +name=+ +object.call+ +:symbol+',h) produces:

+ActiveRecord::Base+ +merge!+ +is_a?+ +name=+ +object.call+ +:symbol +

require 'rdoc' RDoc::VERSION #=> "2.4.3" So now I'm thinking RDoc no longer has SM ? And when I require it I am actually picking up the RDoc built into Ruby 1.8.7, but when I require 'rdoc' I'm getting the latest Gem I installed.