From ryan at fangamer.com Mon Jan 5 01:05:36 2009 From: ryan at fangamer.com (Ryan Alyea) Date: Mon, 5 Jan 2009 00:05:36 -0600 Subject: Better supporting parenthesis in links... Message-ID: Is there a better way to support parenthesis in links like Wikipedia links? Requiring brackets around the link is confusing to many new users who don't understand why their Wikipedia links won't work. I wrote a patch on the latest version of RedCloth to support this a lot better. Instead of stopping on a end parenthesis, it instead looks at the URL itself. If the number of opening and closing parenthesis are equal, it allows the end parenthesis in the link. I'm sure there's a better way, like checking if they are properly nested. Included is two patches, one for the C code, another to include more tests. I do not have Java, so I cannot test myself, however it should be trivial to port. -------------- next part -------------- A non-text attachment was scrubbed... Name: links_containing_parenthesis.patch Type: application/octet-stream Size: 1295 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tests_for_links_containing_parenthesis.patch Type: application/octet-stream Size: 1909 bytes Desc: not available URL: -------------- next part -------------- Ryan Alyea ryan at fangamer.com From jg at jasongarber.com Tue Jan 20 16:54:16 2009 From: jg at jasongarber.com (Jason Garber) Date: Tue, 20 Jan 2009 16:54:16 -0500 Subject: Better supporting parenthesis in links... In-Reply-To: References: Message-ID: <295D5F13-AA52-4335-ADB3-5703F63731B7@jasongarber.com> Fantastic! Thank you, Ryan. I've added it to an existing ticket and I can't wait to apply your patch. The ticket's URL is http://jgarber.lighthouseapp.com/projects/13054-redcloth/tickets/82-rendering-error-for-link-with-parenthesis Jason On Jan 5, 2009, at 1:05 AM, Ryan Alyea wrote: > Is there a better way to support parenthesis in links like Wikipedia > links? Requiring brackets around the link is confusing to many new > users who don't understand why their Wikipedia links won't work. I > wrote a patch on the latest version of RedCloth to support this a > lot better. Instead of stopping on a end parenthesis, it instead > looks at the URL itself. If the number of opening and closing > parenthesis are equal, it allows the end parenthesis in the link. > I'm sure there's a better way, like checking if they are properly > nested. > > Included is two patches, one for the C code, another to include more > tests. I do not have Java, so I cannot test myself, however it > should be trivial to port. > > < > links_containing_parenthesis > .patch> > > Ryan Alyea > ryan at fangamer.com > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards From lists at ruby-forum.com Wed Jan 21 17:38:27 2009 From: lists at ruby-forum.com (Azul Blue) Date: Wed, 21 Jan 2009 23:38:27 +0100 Subject: RedCloth 4.1.1 released In-Reply-To: References: Message-ID: Jason Garber wrote: > This release fixes problems with the echoe development dependency, > requiring RedCloth using CamelCase, and incorrect platform labels on > the win32 and JRuby gems. All these were the result of switching to > echoe (like hoe, but it doesn't make itself a runtime dependency) to > do the cross-platform compilation and gem packaging. It looks like echoe would still be a dependency to me: :~$ redcloth --version RedCloth 4.1.1 :~$ sudo gem uninstall echoe [sudo] password for utopia: You have requested to uninstall the gem: echoe-3.0.2 RedCloth-4.1.1 depends on [echoe (>= 0)] If you remove this gems, one or more dependencies will not be met. Continue with Uninstall? [Yn] Y Successfully uninstalled echoe-3.0.2 :~$ redcloth --version /usr/lib/ruby/1.8/rubygems.rb:578:in `report_activate_error': Could not find RubyGem echoe (>= 0) (Gem::LoadError) from /usr/lib/ruby/1.8/rubygems.rb:134:in `activate' from /usr/lib/ruby/1.8/rubygems.rb:158:in `activate' from /usr/lib/ruby/1.8/rubygems.rb:157:in `each' from /usr/lib/ruby/1.8/rubygems.rb:157:in `activate' from /usr/lib/ruby/1.8/rubygems.rb:49:in `gem' from /usr/bin/redcloth:18 Is that right? The programm that uses RedCloth also still reports that RedCloth could not be found if echoe is not installed. -- Posted via http://www.ruby-forum.com/. From jg at jasongarber.com Fri Jan 23 17:02:35 2009 From: jg at jasongarber.com (Jason Garber) Date: Fri, 23 Jan 2009 17:02:35 -0500 Subject: Need your help with RubyGems 1.2.0 issue Message-ID: <1ED1987C-4BBE-463C-B021-66CE4225F102@jasongarber.com> Can anyone give us some help on #80? I installed gem 1.2.0 on a virtual machine and made sure echoe wasn't installed. Tested whether the echoe dependency was runtime or development on the RedCloth 4.1.1 remote gem: @@@ $ gem specification RedCloth -r | head -n 20 --- !ruby/object:Gem::Specification name: RedCloth version: !ruby/object:Gem::Version version: 4.1.1 platform: ruby authors: - Jason Garber autorequire: bindir: bin cert_chain: [] date: 2008-11-19 00:00:00 -05:00 default_executable: dependencies: - !ruby/object:Gem::Dependency name: echoe type: :development version_requirement: version_requirements: !ruby/object:Gem::Requirement requirements: @@@ Okay, so how 'bout when I install RedCloth 4.1.1 under RubyGems 1.2.0? I install it and do gem specification RedCloth and sure enough, it's a runtime dependency. Am I doing something wrong or was this just a bug in RubyGems 1.2.0? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: