Image tag should expand to figure when used with title

I have been prototyping an extension for figures using a block structure similar to fenced code block using the character sequence ^^^:

^^^
This is a text
> With a block quote and an ![image](/url "my title")
^^^ My caption

is generating this:

<figure>
  <p>This is a text</p>
  <blockquote><p>With a block quote and an <img src="/url" alt="image" title="my title"><p>
  </blockquote>
  <figcaption>My caption</figcaption>
</figure>

The caption can be put on the opening block (on the first ^^^) or on the closing.