Displaying 1 result from an estimated 1 matches for "coderay_dressed".
2011 Jan 23
2
RedCloth 4.1.1 vs. 4.2.3 - weird behaviour with notextile
...s works with the fairly old RedCloth 4.1.1 but not with 4.1.9, 4.2.2 and
4.2.3. In these versions, odd effects occur doubling content (and destroying
style).
I am posting this here as I am quite new to Rails and uncertain, whether
this is actually a bug or an error on my side :/
The Helper:
def coderay_dressed(text)
text.gsub!(/@@@(\w*?)\s+(.+?)\s*@@@/m) do
$1 != '''' ? @lang = $1 : @lang = ''none''
code = CodeRay.highlight($2, @lang, :css => :class)
"<notextile>#{code}</notextile>"
end
return text.html_safe
end
S...