similar to: Textile headaches

Displaying 20 results from an estimated 1200 matches similar to: "Textile headaches"

2006 Mar 25
2
Textilize problems with line breaks
I''m having a problem formatting some text. I have a textarea that I input my text into, which will then be put into an e-mail and sent out. The problem I am having is when there is a single line break. Multiple line breaks work fine (hitting enter twice), but single line breaks don''t seem to work properly. Take the following input: Line1. Line2. Line3. Line4. Using
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 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 May 11
3
Textile/RedCloth and h() incompatible?
If a user enters the Textile-based code for an image, say: !>graphic.png! the textile() method will successfully render a right-float image. Now, if I want to escape the user''s text using h(), the ''>'' is turned into an &amp;. Obviously, the image then fails to render in a browser. Is there a work around for this? I guess what I''m really asking
2006 Apr 01
4
Custom Validations
Does anyone how to create a validation that: validates_presence_of :a OR :b I.e. :a OR :b must be present. I thought this would probably be possible with some kind of validation callback, e.g.: def check_a_or_b_is_set return (a or b) end Any ideas? Thanks, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
2008 Oct 06
2
textilize with --- (3 dashes) removes text
Hi, using --- (3 dashes) at the end of a string that is textilized, results in a single hr tag without any text. This seems weird to me. Am I overlooking something? >> av = ActionView::Base.new >> av.textilize("sometext ---") => "<hr />" Cheers, Jan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Aug 13
3
escape block using red cloth
Hi all, Is it possible to configure red cloth to escape a block such as: ------------------------------------------------------------------ Hello, _this_ works *beautifull* [code lang="ruby"] def foo bar end [/code] ------------------------------------------------------------------ The text in the [code] block should not be parsed by Red Cloth''s to_html method. I cannot
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&#8217;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? --
2011 Jan 13
9
spurious <li> generated when list followed by 3
RedCloth master generates a spurios <li> element when a numbered or undumbered list is followed by three or more newlines. RedCloth.new("* one\n* two\n* three \n\n\n").to_html #=> "<ul>\n\t<li>one</li>\n\t<li>two</li>\n\t<li>three</li>\n</ul>\n<li>" # note extra trailing <li> outside <ul> A colleague
2006 Mar 16
4
Handling/Catching Exceptions
Hello! I was wondering, sometimes I raise an exception in my Rails apps, e.g.: raise SecurityError unless @post.user == logged_in_user Now: is there any way to catch that SecurityError exception somewhere and render a custom template? E.g., I want to render ''app/views/content/security_error.rhtml'' Does anyone know how to do this? Thanks a bunch, Rob
2007 Dec 04
2
Bug: NoMethodError: private method `gsub'' called for nil:NilClass
Hi there. I''m using RedCloth as part of a social network''s blog system. I came across the following bug when an img tag with the src attribute is inputted, and filter_html is set to true. I have pasted the code sample below. >> require ''RubyGems'' => true >> require ''RedCloth'' => true >>
2010 Apr 13
1
BBCode Fork of RedCloth
how do you install this? especially on rails 3? putting gem "redcloth", :git => "git://github.com/ROFISH/redcloth.git" doesn''t work. and do nested tags like [quote][quote][/quote][/quote] work? -- Posted via http://www.ruby-forum.com/.
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
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
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
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/.
2006 Mar 07
6
Anybody use Red|Blue Cloth?
Does anybody use and prefer Redcloth (or bluecloth, which appears to be alpha)? Does it affect performance much? Is there a way to get it to automatically process templates without having to call textilize? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
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 May 21
3
Sending mail times out (ActionMailer)
Hi! I''m on debian. Sending a mail from Rails times out: Timeout::Error (execution expired): /usr/local/lib/ruby/1.8/timeout.rb:54:in `new'' /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'' /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout''