I''m sorry if this is off-topic, but this does seem like a likely audience. Is anyone else having issues with RedCloth? I''ve read nonstop praise for this package, but there doesn''t seem to be a dedicated mailing list, the docs don''t have many examples for customizing HTML output, and some of the examples just don''t seem to work. For example, on three boxes of mine (which leads me to believe that I''ve *got* to be missing something *or* there''s a bug) I''m using RedCloth 3.0.4, and this, r = RedCloth.new( "h1. A <b>bold</b> man", [:filter_html] ) r.to_html does *not* produce this, =>"<h1>A <b>bold</b> man</h1>" What is *does* produce is this: =>"<h1>A <b>bold</b> man</h1>" What am I missing?
Perhaps you should do: r = RedCloth.new( h("h1. A <b>bold</b> man"), [:filter_html] ) h is a function to strip out all html of text, which would convert <b>bold</b> to <b>bold</b>, which is what you want I think. I don''t have much experience with RedCloth though, so I am not sure. --Ben Hiller> I''m sorry if this is off-topic, but this does seem like a likely > audience. Is anyone else having issues with RedCloth? I''ve read > nonstop praise for this package, but there doesn''t seem to be a > dedicated mailing list, the docs don''t have many examples for > customizing HTML output, and some of the examples just don''t seem to > work. > > For example, on three boxes of mine (which leads me to believe that > I''ve *got* to be missing something *or* there''s a bug) I''m using > RedCloth 3.0.4, and this, > > r = RedCloth.new( "h1. A <b>bold</b> man", [:filter_html] ) > r.to_html > > does *not* produce this, > > =>"<h1>A <b>bold</b> man</h1>" > > What is *does* produce is this: > > =>"<h1>A <b>bold</b> man</h1>" > > What am I missing?
In article <690211aa0510301646j8ae6dc1j2559f7f1b4c51c9e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>, benhiller-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org says...> > For example, on three boxes of mine (which leads me to believe that > > I''ve *got* to be missing something *or* there''s a bug) I''m using > > RedCloth 3.0.4, and this,AFAIK, RedCloth 3.0.4 is a doorstop (er, buggy interim release)... roll back to 3.0.3 and see if it works. -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler
Well, this is a good suggestion, although I thought that the :filter_html specifier was supposed to accomplish the same thing. My confusion arises with the idea that if I use the h() function then why do I need :filter_html? And if :filter_html doesn''t do what it should, then *someone* must be having a similar problem out there ... I''m afraid my experience with RedCloth doesn''t go very far either, but at this rate I''m wondering if it''s the right solution since, unless I''m missing something obvious, it certainly isn''t as intuitive as I would think it should be. I like the Textile and Markdown markup, but I''m disappointed that this doesn''t seem to be working as advertised. On 10/30/05, Benjamin Hiller <benhiller-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Perhaps you should do: > r = RedCloth.new( h("h1. A <b>bold</b> man"), [:filter_html] ) > > h is a function to strip out all html of text, which would convert > <b>bold</b> to <b>bold</b>, which is what you want I > think. > > I don''t have much experience with RedCloth though, so I am not sure. > > --Ben Hiller > > > I''m sorry if this is off-topic, but this does seem like a likely > > audience. Is anyone else having issues with RedCloth? I''ve read > > nonstop praise for this package, but there doesn''t seem to be a > > dedicated mailing list, the docs don''t have many examples for > > customizing HTML output, and some of the examples just don''t seem to > > work. > > > > For example, on three boxes of mine (which leads me to believe that > > I''ve *got* to be missing something *or* there''s a bug) I''m using > > RedCloth 3.0.4, and this, > > > > r = RedCloth.new( "h1. A <b>bold</b> man", [:filter_html] ) > > r.to_html > > > > does *not* produce this, > > > > =>"<h1>A <b>bold</b> man</h1>" > > > > What is *does* produce is this: > > > > =>"<h1>A <b>bold</b> man</h1>" > > > > What am I missing? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Argh. Good suggestion. Tried it, didn''t work. Still same problem. Has anyone else got 3.0.4 or 3.0.3 working with the examples and :filter_html or :lite_mode? Any example code?
Great. I love software that doesn''t work. It''s my favorite thing. Well, thanks Matt, I appreciate your input. I guess I''ll roll my own solution, which is probably better in the long run anyway. Either that or I''ll use a basic Textile result and filter that on my own. Or I''ll downgrade and see if that works. Or something. Perhaps BlueCloth at least works as advertised. Isn''t RedCloth written by the Why''s Poignant Guide guy? Yeah. Well, software that doesn''t work makes me feel poignant too. All I know is that the next time I hear someone waxing poetic about RedCloth, I''m going to *scoff*, SCOFF I tell you! Peace, Greg
In article <9a4845b30510311339o4cb9b3c2y3c8956aac7ee0dba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>, gmcclure- Re5JQEeQqe8AvxtiuMwx3w-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says...> Isn''t RedCloth written by the Why''s Poignant Guide guy? Yeah. Well, > software that doesn''t work makes me feel poignant too.Lucas Carlson seems to be in the midst of refactoring it... -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler