This is my trademark®
" irb(main):004:0> module RedCloth::Formatters::HTML irb(main):005:1> def registered(opts) irb(main):006:2> " (r)" irb(main):007:2> end irb(main):008:1> end => nil irb(main):009:0> RedCloth.new('This is just a normal (r).').to_html => "This is just a normal (r).
" Now the problem is that by design the registered symbol consumes any spaces before it. I don't have a solution for that. The other thing you could do is to preprocess your text and surround any instance of (r) or (c) with one of the Textile escaping patterns. $ irb -rubygems irb(main):001:0> require 'RedCloth' => true irb(main):002:0> text = "No trademarks (r) in here!" => "No trademarks (r) in here!" irb(main):003:0> text.gsub!(/(\([cr]\))/, "==\\1==") => "No trademarks ==(r)== in here!" irb(main):004:0> RedCloth.new(text).to_html => "No trademarks (r) in here!
" This latter suggestion is likely to never break with an upgrade; the former one will only break if the name of the method changes. Good luck! Jason On Oct 30, 2008, at 11:46 AM, Jonathan Brun wrote: > Hello, > > I am a Ruby newbie, but I would like to disable a specific rule. I do > not want (c) to become the copyright symbol and (r) to become the > registered symbol. I commented our all the instances I could find of > these in the various RedCloth files, but it does not seem to be > working. > How can I remove a rule? And will it affect my ability to upgrade when > the new RedCloth comes out? > > Thanks, > Jonathan > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards -------------- next part -------------- An HTML attachment was scrubbed... URL: