Commit 74359805 by benjaoming

Merge pull request #35 from rfurman/master

Fix image captions in the case when there are at least two captioned images
parents 60c83ee3 60142fa3
...@@ -40,6 +40,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor): ...@@ -40,6 +40,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor):
except models.Image.DoesNotExist: except models.Image.DoesNotExist:
pass pass
line = line.replace(m.group(1), "") line = line.replace(m.group(1), "")
caption_lines = []
elif previous_line_was_image: elif previous_line_was_image:
if line.startswith(" "): if line.startswith(" "):
caption_lines.append(line[4:]) caption_lines.append(line[4:])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment