Skip to content

Commit

Permalink
Fix bug with not interpreting markdown when using local shortcode
Browse files Browse the repository at this point in the history
- Thanks to @eloy and @glenbot for finding it!
  • Loading branch information
durden committed Jul 31, 2011
1 parent 0c6b090 commit 7015d7b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions apps/codrspace/templatetags/short_codes.py
Expand Up @@ -119,9 +119,6 @@ def filter_upload(value):
if not len(files):
return value, None

# Smashed together text for all files
full_text = ""

for file_path in files:
file_path = os.path.join(MEDIA_ROOT, file_path)
(file_type, encoding) = mimetypes.guess_type(file_path)
Expand All @@ -143,8 +140,8 @@ def filter_upload(value):
f.close()

text = _colorize_table(text, None)
text += '<hr><br>'

# FIXME: Assume all files are only intepreted for code, not markdown?
full_text += '%s<hr><br>' % (text)
value = re.sub(pattern, text, markdown.markdown(value), count=1)

return (full_text, True)
return (value, True)

0 comments on commit 7015d7b

Please sign in to comment.