Last active
June 21, 2019 13:44
-
-
Save piotrpog/b665396e625b19459f98999ad161225b to your computer and use it in GitHub Desktop.
Phone number macro - this macro strips unnesesary haracters from phone numbers and generates "phone links.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% macro phoneNumber(phoneNumber) %} | |
<a href="tel:{{ phoneNumber|replace({'-':'', ' ':'', '.':'', '(':'', ')':''}) }}">{{ phoneNumber }}</a> | |
{% endmacro %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment