Closed dorianmariecom closed 3 years ago
If you can use a Renderer (like HtmlRenderer
), you could do this by overriding/wrapping the text
callback, ensuring you don't fire on random bits of text elsewhere. The alternative would be to do this same thing as a post-processing step with Nokogiri or similar.
Yeah I would say that tapping into the a
elements with Nokogiri (or https://github.com/gjtorikian/html-pipeline) would be the best option here.
https://github.com/gjtorikian/html-pipeline is exactly what I need, thanks!
Here is how I'm doing it but it's quite hacky, the main issue is with links that contain what could be a phone number