In pandoc version of markdown, empty text is not only legal, but serves to distinguish paragraph images (not labeled, not indented and not automatically numbered) from figures.
I agree that syntax highlighters should work on as many variants as possible.