Last active
August 29, 2015 14:06
aText snippet that takes a gist ID or URL from the clipboard and creates a Wordpress shortcode/link pair
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
GIST_ID=$(echo "【clipboard】" | sed -Ee 's/https?:\/\/gist\.github\.com\/[^\/]+\///') | |
echo "[gist ${GIST_ID} /]" \ | |
"<div class=\"no_js\">" \ | |
"<a name=\"${GIST_ID}\"></a>" \ | |
"<a href=\"#${GIST_ID}\">Click here to see the Gist.</a>" \ | |
"</div>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment