Forum: Redcloth access to helper method

Posted by 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
Posted by Gaspard Bucher (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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.