Forum: Redcloth access to helper method

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
stuefer manuel (Guest)
on 2009-06-25 16:27
(Received via mailing list)
Hi, does someone of you ever tried to put some helper methods in
database with some other text like this:

  h1. title
  <%= helper(id) %>
  description

and get an output using RedCloth?! what I need is that the helper
function would be elaborated .. not only displayed as html

mS
267e080a55f06a939551bfd2a5520f96?d=identicon&s=25 Gaspard B. (gazoduc)
on 2009-06-25 16:42
(Received via mailing list)
I am investigating something similar for zena using RubyLess (direct
parsing of ruby from db is *dangerous* to say the least):
http://tinyurl.com/mhw5ag.

While investigating on new ways to parse, extracting things such as
"<%= ... %>" or "{{... }}" is definitely an option.

For the moment, I just double parse the text and only extract "[label]
... [/label]" in a two step process:

1. remove [label]...[/label] from text and replace with a placeholder
"===38475==="
2. parse with redcloth
3. replace placeholders by actual content

Gaspard

On Thu, Jun 25, 2009 at 4:18 PM, stuefer
This topic is locked and can not be replied to.