Have you seen this announcement?
http://feeds.feedburner.com/~r/RubyInside/~3/342732232/redcloth-4-released-962.html
Apart from dropping of Markdown support (does radiant use it?), it
could be interesting to update it.
Have you seen this announcement?
http://feeds.feedburner.com/~r/RubyInside/~3/342732232/redcloth-4-released-962.html
Apart from dropping of Markdown support (does radiant use it?), it
could be interesting to update it.
How would people feel about switching to a gem dependency on the latest
RedCloth (instead of packaging it)?
Sean
I’m fine with it. Looks like a good improvement too.
Now all we need is a better Markdown parser.
-Chris
Someone was working on a branch that uses rdiscount, an improved
Markdown parser.
Sean
It’s a bit of a detour from Radiant being geared toward shared hosting.
John M. is working on a branch than uses RDiscount (which is a
better Markdown parser).
http://github.com/johnmuhl/radiant/tree/markdown
On Jul 24, 2008, at 11:05 AM, Chris P. wrote:
Sean
Ollivier R. wrote:
Have you seen this announcement?
RedCloth 4.0 Released: 40x Faster Textile Rendering
released-962.htmlApart from dropping of Markdown support (does radiant use it?), it
could be interesting to update it.
Jim G.
That was my main concern… I’d like to continue packaging the library
with Radiant, but it is no longer pure-Ruby and must be compiled. That
said, RubyGems has greatly improved since we started down this road.
Sean
I understood discoount to be *nix only (no Windows). I’ll have to look
into it further.
-Chris
On 2008/07/24, at 07:44, Sean C. wrote:
How would people feel about switching to a gem dependency on the
latest RedCloth (instead of packaging it)?
I think it’s going to have to happen at some point unless Radiant
wants to keep using the same old text parsing libraries from
2004/2005. Waiting for the pure ruby libraries catch back up is the
other (wishful) option.
On 2008/07/24, at 09:31, Chris P. wrote:
I understood discoount to be *nix only (no Windows). I’ll have to
look into it further.
That’s right. Although there isn’t anything really stopping it from
being compiled for windows with mingw just like they did RedCloth 4;
except of course finding people who use windows to do the work
There is also PEG markdown (rpeg-markdown in ruby land) but right now
it is completely unusable on big (huge?) spans of text and I’m not
sure it’s any easier to get running in windows. Personally, I’d rather
have a PEG based Markdown than a Discount based one.
As far as getting a new Markdown parser into core I’d say don’t even
bother yet. As has been stated Discount doesn’t (yet) run on windows,
and PEG Markdown is crashy (and probably doesn’t run on windows either).
I would definitely like to see Radiant upgrade to RedCloth 4 sometime
soon. If no one jumps up to take it on in the next week, I’ll try to
get it running then.
p.s. I did put together a standalone Markdown filter that uses
rdiscount, so if you can install gems and don’t run windows you can
use that until something better is in the core. I use it on live sites
with no problems (some were even started with the standard Markdown
filter and upgraded without issue).
I saw somewhere that Luis L. was researching porting rDiscount to
Windows but also that it didn’t look good (discount depends on some *nix
only libraries, I think)
Hopefully I’m wrong, though.
Either way, I didn’t mean to hijack a thread. New Redcloth for all!
-Chris
On Thu, Jul 24, 2008 at 9:18 PM, Chris P.
[email protected] wrote:
I saw somewhere that Luis L. was researching porting rDiscount to
Windows but also that it didn’t look good (discount depends on some *nix
only libraries, I think)Hopefully I’m wrong, though.
Either way, I didn’t mean to hijack a thread. New Redcloth for all!
Thread-hijacking…
rDiscount uses some neat posic tricks that allow them use callbacks
from file operations in a in-memory file (mapped file). This function
is name funopen and fopencookie.
There is no way to recreate that in Windows, tried and failed (maybe
because my C-fu is not good enough). There are better ways that the
same can be accomplished but we should be careful not to exploit with
huge memory buffers.
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
How do I try the new RedCloth 4 with radiant? I do remember seeing
instructions somewhere.
Jasper
Jim G. wrote:
It’s a bit of a detour from Radiant being geared toward shared hosting.
John M. is working on a branch than uses RDiscount (which is a
better Markdown parser).
http://github.com/johnmuhl/radiant/tree/markdown
Simply gem unpack. Easy peasy. Also, Webfaction is one of the best in
terms of shared hosting, rails and radiantcms.
Make that:
Object.send :remove_const, :RedCloth if Object.const_defined?
(:RedCloth) && RedCloth::VERSION.is_a?(String)
$:.delete File.join(RADIANT_ROOT, ‘vendor’, ‘redcloth’, ‘lib’)
gem ‘RedCloth’, ‘>= 4.0.3’
require ‘RedCloth’
Jasper,
I’ve just put out a redcloth4 Radiant extension:
http://ext.radiantcms.org/extensions/28-redcloth4
Give that a try.
Jasper Kooij wrote:
How do I try the new RedCloth 4 with radiant? I do remember seeing
instructions somewhere.Jasper
I just sent a pull request to make RedCloth a gem dependency, so
hopefully edge will have that ability soon.
In the meantime, I used some code like this in an extension:
Object.send :remove_const, :RedCloth if Object.const_defined?(:RedCloth)
$:.delete File.join(RADIANT_ROOT, ‘vendor’, ‘redcloth’, ‘lib’)
gem ‘RedCloth’, ‘>= 4.0.3’
require ‘RedCloth’
Hope it works for you.
Jason
Jasper Kooij wrote:
Hi Jason,
I’ve tried to load it using the extension way but that failed.
[~/radiant]# script/extension redcloth4
You have to specify an action to do with the extension, like install:
That works perfectly. You’d get the same error if you tried
script/extension page_attachments
Hope the extension is working out well for you!
Jason
Hi Jason,
I’ve tried to load it using the extension way but that failed. Then I
did the git way and that worked fine :
[~/radiant]# script/extension redcloth4
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/activeresource/lib/…/…/activesupport/lib/active_support/dependencies.rb:263:in
load_missing_constant': uninitialized constant Radiant::Extension::Script::Redcloth4 (NameError) from /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/vendor/rails/activeresource/lib/../../activesupport/lib/active_support/dependencies.rb:453:in
const_missing’
from
/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/radiant/extension/script.rb:193:in
const_get' from /usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/lib/radiant/extension/script.rb:193:in
execute’
from script/extension:5
[~/radiant]# cd ~/radiant
[~/radiant]# git clone
git://github.com/jgarber/radiant-redcloth4-extension.git
vendor/extensions/redcloth4
Initialized empty Git repository in
/home/xxxx/radiant/vendor/extensions/redcloth4/.git/
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 16 (delta 4), reused 0 (delta 0)
Receiving objects: 100% (16/16), 11.14 KiB, done.
Resolving deltas: 100% (4/4), done.
Jason G. wrote:
Jasper Kooij wrote:
Hi Jason,
I’ve tried to load it using the extension way but that failed.
[~/radiant]# script/extension redcloth4
You have to specify an action to do with the extension, like install:
script/extension install redcloth4
That works perfectly. You’d get the same error if you tried
script/extension page_attachmentsHope the extension is working out well for you!
Jason
Hi Jason,
Thanks for pointing that out that i’ve missed the obvious! I am using
it, trying to get the hang of redcloth. I relly don’t want to install a
wysiwyg unless i have to.
Thanks
Jasper
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs