How to toggle HTML entities

I found this interesting problem yesterday. I don’t see any practical use case, but still it is a nice one and it could be used in a test about problem solving skills. The following function is based on Karolis’ solution, which was the cleanest.

{[ .toggle-function | 1.hilite(=php=) ]}

The interesting thing is that it’s a real toggle, meaning that

{[ .toggle-concept | 1.hilite(=php=) ]}

 

CategoriesUncategorizedTags

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.