From tom at headshift.com Thu Oct 2 06:37:05 2008 From: tom at headshift.com (Tom Taylor) Date: Thu, 2 Oct 2008 11:37:05 +0100 Subject: Issue with HTML embed code in Redcloth 4.0.3 Message-ID: <9A174C1E-853D-4FE7-9110-706A38F942B6@headshift.com> Hi all, I'm having an issue with HTML embed code in Redcloth 4.0.3. The following embed code is part of some textile that is being rendered with the this command: output = RedCloth.new(text, [:no_span_caps]).to_html(:textile) This code is completely escaped, with no trace of it in the output. However, if I paste it on the same line as some other text, or with text inside the embed tag, it outputs correctly. This is embed code or i am inside embed code The above both render correctly. I presume this is a bug with Textile? Please let me know if there's a better place to file this, or if you need anymore information. Cheers, Tom From jg at jasongarber.com Mon Oct 6 16:37:18 2008 From: jg at jasongarber.com (Jason Garber) Date: Mon, 6 Oct 2008 16:37:18 -0400 Subject: Fwd: JRuby RedCloth progress References: <5f022e5c0810051454i71031286yb61096497618485f@mail.gmail.com> Message-ID: <4C165A90-9DF8-4928-A751-3C06ABA9B600@jasongarber.com> Has anyone done any work on JRuby RedCloth? If so, please respond (see below). Also respond if you have ideas about getting around this problem without it getting too ugly. Begin forwarded message: > From: Chad Johnson > Date: October 5, 2008 5:54:46 PM EDT > To: Jason Garber > Subject: Re: JRuby RedCloth progress > > FYI, > I was able to put some time into this issue over the weekend. I > ended running into a tough JRuby bugged logged here : > > http://jira.codehaus.org/browse/JRUBY-3039 > > While this probably isn't a deal breaker the workaround would be > pretty ugly (imo). Do you happen to have the GitHub url's of the > other's who've attempted the port? I'm curious to see how they > address this issue. > > -Chad J > > On Mon, Sep 29, 2008 at 7:35 AM, Jason Garber > wrote: >> So far I've not seen any progress. There have been these two >> messages on >> redcloth-upwards: >> >> http://rubyforge.org/pipermail/redcloth-upwards/2008-September/000318.html >> http://rubyforge.org/pipermail/redcloth-upwards/2008-September/000319.html >> >> But there have been no checkins on Github. I'd love it if you >> could step >> up! If you're ready to start, maybe join the redcloth-upwards list >> and >> check in with everybody. >> >> Thanks! >> Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From chadjamesjohnson at gmail.com Mon Oct 6 20:11:38 2008 From: chadjamesjohnson at gmail.com (Chad Johnson) Date: Mon, 6 Oct 2008 19:11:38 -0500 Subject: JRuby RedCloth progress In-Reply-To: <4C165A90-9DF8-4928-A751-3C06ABA9B600@jasongarber.com> References: <5f022e5c0810051454i71031286yb61096497618485f@mail.gmail.com> <4C165A90-9DF8-4928-A751-3C06ABA9B600@jasongarber.com> Message-ID: <5f022e5c0810061711r18d3ad28j45aa07fa5a513ba@mail.gmail.com> On Mon, Oct 6, 2008 at 3:37 PM, Jason Garber wrote: > Has anyone done any work on JRuby RedCloth? If so, please respond (see > below). Also respond if you have ideas about getting around this problem > without it getting too ugly. To help shed more light on the situation... In my port attempt (http://github.com/chadj/redcloth/tree/jruby) I was planning on using the annotation enabled routines for binding Java methods to JRuby methods. My intent was to sub-class RubyString directly in Java to implement RedCloth::TextileDoc. Well, that approach won't work until RubyString can be subclassed (http://jira.codehaus.org/browse/JRUBY-3039). I'm curious to see what approach the other folks who've attempted the port have taken. -Chad J From jg at jasongarber.com Wed Oct 15 16:59:32 2008 From: jg at jasongarber.com (Jason Garber) Date: Wed, 15 Oct 2008 16:59:32 -0400 Subject: Lots of tickets; vacation Message-ID: <18EE1D03-E510-4042-AD06-9696B57ED0BD@JASONGARBER.COM> Thanks for all the tickets. There are currently 14 in the queue (a bit overwhelming!). I'm going to be away for the next week, but when I return I hope to attack some of them. If you come up with a patch that fixes one, please send it along! Jason From jg at jasongarber.com Fri Oct 24 17:19:52 2008 From: jg at jasongarber.com (Jason Garber) Date: Fri, 24 Oct 2008 17:19:52 -0400 Subject: JRuby version Message-ID: Hi, everyone. As you know, we've been waiting for someone to convert the C guts to Java, since I didn't have the time or skills. Well, I'm happy to report that Ola Bini came through for us! Since he just copied the Ragel code (like was done for Hpricot), I spent about 10 hours DRYing it up and reworking the Rakefile so it compiles/cross-compiles appropriately. I didn't mind it so much, since he did the part I couldn't?writing Java. :-) Unfortunately, no one ever put money in the JRuby pot, http://pledgie.org/campaigns/1081 so there's nothing to offer Ola, but I do offer him my deep gratitude! I merged the jruby changes into the master branch and pushed it to GitHub, so give it a try. I think it takes trunk JRuby to compile. Of course, we'll release a precompiled jruby gem, but since it's Friday at 5pm, I'll wait until Monday or Tuesday to release it. Jason From lists at ruby-forum.com Thu Oct 30 11:46:33 2008 From: lists at ruby-forum.com (Jonathan Brun) Date: Thu, 30 Oct 2008 16:46:33 +0100 Subject: Disable certain rules? In-Reply-To: <60EB928A-4A11-43EF-8E10-4B569DA8715B@jasongarber.com> References: <60EB928A-4A11-43EF-8E10-4B569DA8715B@jasongarber.com> Message-ID: <49d9b41684f0de15655eb9fbf47a35b1@ruby-forum.com> 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/. From jg at jasongarber.com Fri Oct 31 06:25:51 2008 From: jg at jasongarber.com (Jason Garber) Date: Fri, 31 Oct 2008 06:25:51 -0400 Subject: Disable certain rules? In-Reply-To: <49d9b41684f0de15655eb9fbf47a35b1@ruby-forum.com> References: <60EB928A-4A11-43EF-8E10-4B569DA8715B@jasongarber.com> <49d9b41684f0de15655eb9fbf47a35b1@ruby-forum.com> Message-ID: <1379EA11-A2A3-426F-982E-8A2FD2F9B27A@jasongarber.com> Well, off the top of my head I don't know how you can disable a rule so it isn't recognized, but probably the easiest way to have the same net result is to change the formatting that happens when it _is_ recognized so that it's unchanged. $ irb -rubygems irb(main):001:0> require 'RedCloth' => true irb(main):003:0> RedCloth.new('This is my trademark(r)').to_html => "

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: From jg at jasongarber.com Fri Oct 31 17:08:42 2008 From: jg at jasongarber.com (Jason Garber) Date: Fri, 31 Oct 2008 17:08:42 -0400 Subject: RedCloth 4.1.0 released with JRuby support Message-ID: Sorry it took me a week to release the JRuby version. I was out sick most of the week. Thanks a million, Ola Bini, for implementing the Java code! Give it a go: Ruby: gem install RedCloth JRuby: jgem install RedCloth Let me know how it goes for you. Jason