search for: to_html

Displaying 20 results from an estimated 67 matches for "to_html".

2009 May 05
3
Only partially reading a page!
...ifferent_form) For debugging this problem, I then immediately write the resulting page to two different logs: File.open(''big.html'',''wb'') { |f| f.write(page.body) } File.open(''little.html'',''wb'') { |f| f.write(page.root.to_html) } The results of these two methods (page.body vs. page.root.to_html) are dramatically different, with most of the page missing from the page.root.to_html version. In other words, the form appears in page.body, but not in page.root.to_html. Furthermore, page.body seems to have valid html, becaus...
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 /> tags, including what...
2006 Aug 13
3
escape block using red cloth
...------------------------------------------------------------------ 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 find it in the docs. Many regards, Harm de Laat Kabisa ICT The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060813/a35137b5/attachment.html
2006 Mar 25
2
Textilize problems with line breaks
...gle line breaks don''t seem to work properly. Take the following input: Line1. Line2. Line3. Line4. Using <%= textilize @body %> gives me: Line1. Line2. Line3. Line4. Knowing that there''s an issue in rails with hard_breaks and textilize, I tried RedCloth.new(@body).to_html, which gave me: Line1. Line2. Line3.Line4. Am I missing something??
2008 Mar 09
4
comment avoir la liste des gems ?
bonjour , je voudrais savoir de quelle façon est ce qu''on peut savoir les gems installés dans un serveur hebergeur sans avoir acces au SSH ? pour les informations sur rails ou ruby c''est fait ;) en utilisant la commande suivante dans une view : Rails::Info.to_html mais le probleme ça donne pas de detail sur les gems !!!! une idée ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA...
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 missing? Thank you for your help, Jean-Etienne -- Woa! Kft www.novAgora.hu "All you need in this life is ignorance and confidence; then success is sure.&qu...
2006 Aug 04
0
Hard break broken in 3.0.4?
...$ pwd /lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib $ irb irb(main):001:0> require ''redcloth'' => true irb(main):002:0> rc = RedCloth.new("h1. Heading\n\n_Not_ heading.") => "h1. Heading\n\n_Not_ heading." irb(main):003:0> rc.to_html(:textile) => "<h1>Heading</h1>\n\n\n\t<p><em>Not</em> heading.</p>" All good so far. But now: irb(main):004:0> rc.hard_breaks = true => true irb(main):005:0> rc.to_html(:textile) => "<h1>Heading<br />\n&l...
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 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? --
2007 Dec 04
2
Bug: NoMethodError: private method `gsub'' called for nil:NilClass
...attribute is inputted, and filter_html is set to true. I have pasted the code sample below. >> require ''RubyGems'' => true >> require ''RedCloth'' => true >> RedCloth.new(''<img src="">'',[:filter_html]).to_html NoMethodError: private method `gsub'' called for nil:NilClass from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/gems/1.8/gems/RedCloth-3.0.4/lib/RedCloth.rb:1118:in `clean_html'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/ge...
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 generated a pull request with a new rspec test that exposes this bug: https://github.com/jga...
2006 Apr 01
2
Textile headaches
...1>Header</h1> <p>Some text</p> This is what I tried but no luck: irb(main):002:0> require ''rubygems'' => true irb(main):004:0> require_gem ''RedCloth'' => true irb(main):006:0> RedCloth.new("h1. Header\r\nSome Text").to_html => "<h1>Header\nSome Text</h1>" Any ideas? Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060401/7a00d72c/attachment.html
2006 Mar 23
4
Error with Rails 1.1RC1 and Properties page
...S_ROOT: script/../config/.. /usr/lib/ruby/1.8/cgi.rb:362:in `escapeHTML_fail_on_nil'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2.4008/lib/action_controller/cgi_ext/cgi_ext.rb:13:in `escapeHTML'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0.4008/builtin/rails_info/rails/info.rb:55:in `to_html'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0.4008/builtin/rails_info/rails/info.rb:53:in `each'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0.4008/builtin/rails_info/rails/info.rb:53:in `to_html'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0.4008/builtin/rails_info/rails/info.rb:52:in `r...
2006 Jun 05
2
Bug in RedCloth or in my head?
...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 to the right, all should be emm dashes -</del></p>" There is a limit of one emm-dash per line -- ought to document this restriction. Warren Fred
2007 Jan 16
1
<BR> and <P> in RedCloth v. Textism
...In IRB if I try to feed an equivalent string to RedCloth I get (accounting for hard_breaks on and off here): irb(main):006:0> val = RedCloth.new("test\ntext\n\nother") => "test\ntext\n\nother" irb(main):007:0> val.hard_breaks = true => true irb(main):008:0> val.to_html => "<p>test<br />text<br />\nother</p>" irb(main):009:0> val.hard_breaks = false => false irb(main):010:0> val.to_html => "<p>test\ntext</p>\n\n\n\t<p>other</p> " Basically, RedCloth either passes the single newline...
2006 Nov 02
2
Update map
...er = GMarker.new([59.00000, 10.00005], :title => "Update", :info_window => "I have been placed through RJS") end my index.rhtml: <html><head><title>blabla</title> <%= javascript_include_tag :defaults %> <%= GMap.header %> <%= @map.to_html %> </head><body> <%= @map.div(:width => 600, :height => 400) %> <%= link_to_remote("Update", :url => {:action => :shift}) %> </body> </html> my shift.rjs: page << @map.clear_overlays page << @map.add_overlay(@marker) What...
2007 Mar 08
1
map not displayed after Ajax.updater request
...#39;display_network'' , :layout => false end then in my view <% if @display_type == "0" %> .... display table <% else %> <div id="map_box" style="border:solid 2px grey; margin:1em auto; width:340px; height:340px;"> <%= @map.to_html %> <%= @map.div(:width => 338, :height => 330) %> </div> <% end %> the map_box is displayed (grey line border) , but not the map inside.. no GoogleMap request.... looking at the response source code , I can see the inserted script (with the right data...) <d...
2008 Sep 17
2
bug in maruku with single-element nested unordered list?
...es work on the dingus [1]: * asdf * asdf >> require ''maruku'' => true >> doc = Maruku.new("* asdf\n * asdf\n") => md_el(:document,[ md_el(:ul,[md_el(:li_span,["asdf * asdf"],{:want_my_paragraph=>false},[])],{},[]) ],{},[]) >> doc.to_html => "<ul>\n<li>asdf * asdf</li>\n</ul>" [1] http://daringfireball.net/projects/markdown/dingus
2006 Mar 01
1
break in a each function
...;link''].text @artikel.article_type_id = 1 @artikel.publicatie_on = Time.new paragraaf = Paragraaf.new() paragraaf.ondertitel = item.elements[''title''].text paragraaf.tekst = item.elements[''description''].text @artikel.bericht = paragraaf.to_html @artikel.save next unless counter===10 end end -- Posted via http://www.ruby-forum.com/.
2006 Jul 25
1
Blank map?
...y controller is simply this: @map = GMap.new("map_div") @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([0, 0], 6) and my view is this: <head> <%= javascript_include_tag :defaults %> <%= GMap.header %> <%= @map.to_html %> </head> <body> <h2>Map should be below</h2> <%= @map.div %> </body> Any help greatly appreciated. Mike Pence