cv/filters/links.rb
Yann Esposito (Yogsototh) 7d155ef3ef Better render of links
2010-11-23 10:32:35 +01:00

11 lines
252 B
Ruby

class Links
def run (content)
content.gsub(/(<a [^>]*href="(.)[^>]*>)(.*?)(<\/a>)/) do
if $2 == '#'
$&
else
$1+$3+%{<sup><sub>*</sub></sup>}+$4
end
end
end
end