Skip to content

v3.15.0 — why an image failed, and tables in quotes

Latest

Choose a tag to compare

@delphinus delphinus released this 26 Nov 12:58
fc7b492

A web image that fails to load now says why, and tables render inside blockquotes and callouts. Two fixes to layout come along.

A web image that fails to load says why (#94)

A download that failed left its placeholder on "Loading image..." for good. The placeholder now reads, for example, Failed to load image (HTTP 404), in the new MdRenderImageError group (fg from DiagnosticError). The reason is one of:

  • an HTTP status, such as HTTP 404
  • a curl error, such as timed out, could not resolve host, could not connect or file too large
  • not an image, when the server answered 200 with something else, such as a login page

A URL that failed is not fetched again while the view stays open. Close the preview and open it again to retry.

Tables inside blockquotes and callouts (#95)

> | foo | bar |
> |---|---|
> | A | B |

was shown as quoted text, pipes and dashes included. GFM allows a table in a blockquote, and GitHub renders one in a callout too. The table is now drawn behind the quote's bar, and in a callout the bar and background take the callout's colors. A table in a nested quote (>> |) is still shown as text.

Thematic breaks stay inside the window (#92)

A --- or <hr> ran past the window by the width of the indent, and its last columns wrapped onto a row of their own. This showed in toggle and pager windows narrower than g:md_render_max_width.

The text after the cursor stays in view when lines wrap (#81)

Opening a preview on a document with wrapped lines could put the cursor at the bottom of the window, hiding the text that follows it. The preview now counts screen rows rather than buffer lines when it decides where to scroll. Thanks to @denny0223.

Full Changelog: v3.14.0...v3.15.0