Forum: Redcloth access to helper method

14bccd82e27f8b281b77b4de0fed7b1c?d=identicon&s=25 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
D893e113b51a8f200d2abb3ed9e54143?d=identicon&s=25 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
This topic is locked and can not be replied to.