--- a/bundled/markdown2/lib/markdown2.py Fri Jun 18 22:36:26 2010 -0400
+++ b/bundled/markdown2/lib/markdown2.py Fri Jun 18 23:04:40 2010 -0400
@@ -962,10 +962,16 @@
else:
title_str = ''
if is_img:
- result = '<img src="%s" alt="%s"%s%s' \
- % (url.replace('"', '"'),
- link_text.replace('"', '"'),
- title_str, self.empty_element_suffix)
+ if 'imgless' in self.extras:
+ result = '[Image: <a href="%s" alt="a link to an image">%s</a> (%s)]' \
+ % (url.replace('"', '"'),
+ title,
+ link_text.replace('"', '"'))
+ else:
+ result = '<img src="%s" alt="%s"%s%s' \
+ % (url.replace('"', '"'),
+ link_text.replace('"', '"'),
+ title_str, self.empty_element_suffix)
curr_pos = start_idx + len(result)
text = text[:start_idx] + result + text[match.end():]
elif start_idx >= anchor_allowed_pos:
@@ -1006,10 +1012,16 @@
else:
title_str = ''
if is_img:
- result = '<img src="%s" alt="%s"%s%s' \
- % (url.replace('"', '"'),
- link_text.replace('"', '"'),
- title_str, self.empty_element_suffix)
+ if 'imgless' in self.extras:
+ result = '[Image: <a href="%s" alt="a link to an image">%s</a> (%s)]' \
+ % (url.replace('"', '"'),
+ title,
+ link_text.replace('"', '"'))
+ else:
+ result = '<img src="%s" alt="%s"%s%s' \
+ % (url.replace('"', '"'),
+ link_text.replace('"', '"'),
+ title_str, self.empty_element_suffix)
curr_pos = start_idx + len(result)
text = text[:start_idx] + result + text[match.end():]
elif start_idx >= anchor_allowed_pos: