title: Markdown in Python ins't rendering links correctly
body: <p>I am building a website using Python, Flask and Flask-FlatPages. From what I can gather, FlatPages uses the Jinja2 template engine and Markdown for simplifying the formatting of the content.</p>
  
  <p>Until now I have been including images by writing the following raw HTML placed within the other markdown content:</p>
  
  <pre><code>&lt;figure&gt;
      &lt;a href="/static/path/to/image.png" title="Full size"&gt;
          &lt;img src="/static/path/to/image.png" alt=""&gt;
      &lt;/a&gt;
      &lt;figcaption&gt;
          Figure caption.
      &lt;/figcaption&gt;
  &lt;/figure&gt;
  </code></pre>
  
  <p>I would like to simplify this process by using markdown's <a href="http://daringfireball.net/projects/markdown/syntax#img" rel="nofollow">link</a> syntax for images like so:</p>
  
  <pre><code>&lt;figure&gt;
      [![][image]][image]
      &lt;figcaption&gt;
          Figure caption.
      &lt;/figcaption&gt;
  &lt;/figure&gt;
  [image]: /static/link/to/image.png (Full size)
  </code></pre>
  
  <p>When I put this code into <a href="http://daringfireball.net/projects/markdown/dingus" rel="nofollow">Web Dingus</a> it produces the following output:</p>
  
  <pre><code>&lt;p&gt;&lt;figure&gt;
      &lt;a href="/static/link/to/image.png" title="Full size"&gt;
          &lt;img src="/static/link/to/image.png" alt="" title="Full size" /&gt;
      &lt;/a&gt;
      &lt;figcaption&gt;
          Figure caption.
      &lt;/figcaption&gt;
  &lt;/figure&gt;&lt;/p&gt;
  </code></pre>
  
  <p>However, when I put the same code into a markdown document for my website I get the following:</p>
  
  <pre><code>&lt;figure&gt;
      [![][image]][image]
      &lt;figcaption&gt;
          Figure caption.
      &lt;/figcaption&gt;
  &lt;/figure&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>Version info</strong></p>
  
  <pre><code>Flask==0.9
  Flask-Assets==0.8
  Flask-FlatPages==0.3
  Flask-Markdown==0.3
  Jinja2==2.6
  Markdown==2.2.1
  Werkzeug==0.8.3
  </code></pre>