Symfony1 had a helper function called auto_link_text(), which parsed a block of text and wrapped all text URLs in <a> tags, automatically populating the href attribute.
Does Twig include a function like this? I’ve looked on Google, and gone through the code, but can’t find one. I can obviously code one myself, but don’t want to replicate something if it’s already there.
If I do code one myself, should it be a function or a filter?
the function doesn’t exist in twig, but you can even add your own extensions to Twig :