Displaying 20 results from an estimated 2000 matches similar to: "RedCloth and Rails"
2008 May 13
4
hard_breaks issues
Hello,
I''m new to this list, so first of all, many thanks to RedCloth''s
developers, it really helps me in many ruby apps :-)
I post here because I''d like to have a clear view on "hard_breaks"
related issues. I saw old references on the web and on the archives on
this ML, I''d like a fresh view !
It seems that RedCloth 3.0.4 does not handle
2006 Jan 18
1
RedCloth and lang specific hooks
Hi,
I use textilize() which is a great way of letting end users edit contents.
But the code in RedCloth is quite compact, and doesn''t allow for easily
adding correct typographic behaviour depending on the lang of the text.
For instance, correct quoting uses round double quotes in english and
double carons ? ? in french; the spaces before punctuation can be
corrected too. I''d
2006 Jan 27
9
RedCloth Hard Breaks
Has anybody gotten :hard_breaks to work with RedCloth?
I''m doing:
self.body_html = RedCloth.new(self.body).to_html(:textile)
which works, except that it doesn''t transform hard breaks to <br />
tags, which is really important for me.
However, if I do:
self.body_html = RedCloth.new(self.body, [ :hard_breaks ]).to_html(:textile)
then it converts ALL breaks into <br
2006 Apr 25
4
redcloth poblems
Hi, I''m having some problems with redcloth(3.0.4 gem) and textilize.
I have a string:
"h2. hello
_what''s up?_"
which is being textilized as:
<h2>hello<br />
<em>what’s up?</em></h2>
so no paragraph and h2 wrapped all the way.
the input is coming from firefox 1.5.2 on a mac
Anybody got any idea what the problem might be?
--
2006 May 29
1
Init lifecycle and rails
In a servlet J2EE application, there is an init style method that gets
called after that servlet is loaded. Is there something similar within
a rails controller context. I am looking for something where I can load
and setup a particular object.
Also, what about with sessions as well. I would like to call some
library when a user session begins and possibly kill that object when
the
2007 Jan 16
1
<BR> and <P> in RedCloth v. Textism
Hi,
I''m using RedCloth right now for some simple markup in a Rails project.
It''s simple and easy - thanks for a great tool!
I have a question about an apparent discrepancy between RedCloth and
Textile, relating to newline characters. I''ve played with the
"hard_breaks" feature and that seems to generate it''s own problems..
If I go onto the Textile
2005 Dec 21
8
textilize - redcloth
Hi,
I''m using textilize with redcloth 3.0.4. Everything works best except
that paragraphs are not translated as an HTML paragraph
When I write something like:
*first paragraph*
second paragraph
the output is without paragraph:
*first paragraph*
second paragraph
Any help??? Thanks
Jörg
2006 Jun 05
2
Bug in RedCloth or in my head?
Instead of emm-dashes I get struck-out text surrounded with single hyphens. RedCloth
3.0.4:
>> d = RedCloth.new "-- hyphens to the left of me, hyphens to the right, all should be emm
dashes --"
=> "-- hyphens to the left of me, hyphens to the right, all should be emm dashes --"
>> d.to_html
=> "<p><del>- hyphens to the left of me, hyphens
2008 Mar 15
8
Now what?
> $ rake test
> /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/
> rake-0.7.3/lib/rake/rake_test_loader.rb" "test/test_formatters.rb"
> "test/test_parser.rb"
> Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/
> rake_test_loader
> Started
>
2008 Mar 23
1
redcloth gem ragel code doesn''t build in jruby
I tried to install RedCloth-3.274 in jruby (trunk) but the install
failed when RedCloth tried to build the C code using mkmf:
I forget whether SuperRedcloth ever did build in JRuby??
I know Hpricot (which also uses ragel which can compile to Java code)
works in JRuby -- with the patch here:
https://code.whytheluckystiff.net/hpricot/ticket/131)
I might be confusing the two ...
FYI: If you
2006 Mar 10
2
textilize != RedCloth.new ?
For me, textilize(stuff) produces nasty stuff - <br>''s instead of
enclosing <p>''s and some closing <h*>''s are missing. RedCloth.new(stuff)
works fine though. Isn''t textilize supposed to produce the same output?
Or do I need to tweak something?
Joe
--
Posted via http://www.ruby-forum.com/.
2007 Jul 16
6
Advice regarding extending RedCloth
Hello,
I am in a bit of a bind. I need to reliably parse mediawiki markup to
html, and the only parser that I can find (mediacloth) has a lot to be
desired, so I would like to extend something that works and parse
mediawiki markup. My question to this list is should I start working
on RedCloth or SuperRedCloth or is there a difference as far as
extending them? Also does anyone know of a write up
2006 Mar 30
0
Shameless Plug, early rails application
Well, I wanted to mention my early rails application(in the event I stop
working on it). At present it is a link blog, you post a link and now
we have a listing of links from different users. Ideally, it has been a
week or two.
On rails in general, it is really nice, you want to add an action or
update a model, you just do it as opposed to wrapping something in 10
layers of XML. The
2006 Apr 27
0
Another simple rails application - really only a hour or two
This is another simple rails application. I am just putting them out
there; doesn''t really add to any of the other depot applications out
there, just another. From
type ''rails XXXX'' it probably was a hour or so to setup and design the
layout and what-not.
http://www.newspiritcompany.com:8086/helper_numbers_idea/
2005 Nov 16
4
RedCloth repository moved to SVN
I''ve been getting increasing resistance from helpers who prefer
Subversion over CVS. I feel that it''s slowing down development. So,
done. Mailing lists, releases, news will still be at Rubyforge. Bug
tracking will likely move to the new repository soon as well.
The new repository is at: http://code.whytheluckystiff.net/
Checkout RedCloth from
2006 Mar 29
6
Comments for a blog
Hello,
I''m making a blog and I need some function that convert the text
writed for a user in a textarea into a formated text.
I think to use h, but it forget paragraph breaks and I
like allow some tags.
By
Daniel
2006 Jun 14
7
CR issue
Hi,
I am using RedCloth (3.0.4).
First using online text2html (http://www.textism.com/tools/textile/) ,
"123
456"
returns <p>123<br />456</p>
But by code:
<code>
require ''RedCloth''
puts RedCloth.new("123\n456").to_html
</code>
I got:
<p>123
456</p>
CR is not taken in consideration. Is there any parameter I am
2006 Jun 01
1
Upgrading old rails application for new rails version
I want to update my application which was generated with rails 1.0.0 to
the new version. My question. I have already updated the ruby gems
library and things seem to work. Do I really need to update the actual
code. Can I update the code? For example, I noticed that prototype is
a lot newer version. I would like to update that.
--
Berlin Brown
(ramaza3 on freenode)
2006 May 04
1
Ways to share code among the ''layout''
Is there a way to use the same code accross multiple layouts. Normally,
I am associating a layout with a particular controller? Is there a
cleaner way.
--
Berlin Brown
(ramaza3 on freenode)
http://www.newspiritcompany.com
http://www.newspiritcompany.com/newforums
also checkout alpha version of botverse:
http://www.newspiritcompany.com:8086/universe_home
2006 May 29
0
Custom command line libraries for controllers and rails
I have a library that is basically used on the command-line. I am
trying to fit it in for my rails application. So far it works, but I
was worried about how rails does caching or anything else. Basically,
is this an ok approach.
So far, I put the library in RAILS_APP/lib/bot.rb
And ''bot.rb'' contains a class ''VM''.
I have a controller:
BotController..