G
gabriele renzi
Hi gurus and nubys,
I was trying to mix RedCloth[1] with Syntax[2] and I'm
facing some small problems.
The idea is to forward parsing of <pre> tags to the HTML convertor
withouth touching the rest of the code.
I thought that I could subclass RedCloth and override #smooth_offtags
which seem quite nice since the starting <pre> tag is carried till that
point, which could allow, for example, parsing of something like
<pre lang="ruby">.
The problem is in the fact that RC escapes html entities before this
step, and thus when I call #convert on the string Syntax will tokenize
them and give back bad html.
Has someone ever faced this before and has an alternate solution?
thanks in advance.
[1]http://redcloth.rubyforge.org/
[2]http://syntax.rubyforge.org
I was trying to mix RedCloth[1] with Syntax[2] and I'm
facing some small problems.
The idea is to forward parsing of <pre> tags to the HTML convertor
withouth touching the rest of the code.
I thought that I could subclass RedCloth and override #smooth_offtags
which seem quite nice since the starting <pre> tag is carried till that
point, which could allow, for example, parsing of something like
<pre lang="ruby">.
The problem is in the fact that RC escapes html entities before this
step, and thus when I call #convert on the string Syntax will tokenize
them and give back bad html.
Has someone ever faced this before and has an alternate solution?
thanks in advance.
[1]http://redcloth.rubyforge.org/
[2]http://syntax.rubyforge.org