Created
July 20, 2011 04:08
-
-
Save tochiz/1094314 to your computer and use it in GitHub Desktop.
tokyopromenade gist embed patch
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
diff --git a/common.c b/common.c | |
index 54f0695..e483fa6 100644 | |
--- a/common.c | |
+++ b/common.c | |
@@ -914,6 +914,11 @@ void wikitohtml(TCXSTR *rbuf, const char *str, const char *id, const char *buri, | |
tcxstrprintf(rbuf, "<div class=\"rule rule_s%d\">" | |
"<span>----</span></div>\n", lv); | |
ri++; | |
+ } else if(tcstrfwm(line, "gist:")){ | |
+ const char *uri; | |
+ uri = tcstrskipspc(strchr(line, ':') + 1); | |
+ tcxstrprintf(rbuf, "<script src=\"https://gist.github.com/%?.js\"> </script>\n", uri); | |
+ ri++; | |
} else { | |
line = tcstrskipspc(line); | |
if(*line != '\0'){ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment