diff --git a/v2ex/templatetags/filters.py b/v2ex/templatetags/filters.py
index 1ac2077..10b3cfd 100644
--- a/v2ex/templatetags/filters.py
+++ b/v2ex/templatetags/filters.py
@@ -209,7 +209,7 @@ def avatar(value, arg):
# github gist script support
def gist(value):
- return re.sub(r'(http://gist.github.com/[\d]+)', r'', value)
+ return re.sub(r'(http(s)?://gist.github.com/[\d]+)(\.git)?', r'', value)
register.filter(gist)
_base_js_escapes = (
@@ -235,4 +235,4 @@ def escapejs(value):
for bad, good in _js_escapes:
value = value.replace(bad, good)
return value
-register.filter(escapejs)
\ No newline at end of file
+register.filter(escapejs)