3

I was editing a post that included a scanned image of a problem from a textbook. The scanned image contained some text and a related diagram. Here it is, correctly rendered, before editing:

To make the text searchable and accessible, I typed the sentence from the image into the body of the question and cropped the image to show only the diagram. In case the image can't be displayed, I also added a minimally complete description of the diagram (320 characters) as alt text. Since the content is taken verbatim from a published text, I quoted it all using the Ctrl + Q shortcut. This produces Markdown that doesn't render the image at all.

This seems to happen any time the blockquote formatter adds a line break to alt text. If the image is a link, as in the example above:

  • the link is retained;
  • the exclamation point and reference label for the image are rendered literally;
  • square brackets are stripped from the reference label but retained around the enclosed text.

If the image is not also a link, it will instead be interpreted as a link with a literal exclamation point in front).

Non-linked image before and after formatting

The workaround is to either do your blockquotes by hand or remove the extra line breaks (and angle brackets) that the quote formatter inserts. It's not a difficult solution but it's relatively opaque to users who aren't familiar with Markdown.

(Stop inserting hard line-wraps in blockquotes! is a related that points to a similar bug report about MathJax. If you want to fix either of these bugs without removing the line break insertion, it probably makes sense to fix them both at the same time.)

You must log in to answer this question.

Browse other questions tagged .