github BIRSAx2/mdcat mdcat-2.13.0

latest releases: mdcat-2.15.0, mdcat-2.14.0
one month ago

Added

  • Custom heading markers and GFM alert icons/labels via text in a
    [theme.styles] entry in ~/.config/mdcat/config.toml: set h2-h6 to
    override the marker written before heading text, or alert_note-
    alert_caution to override the icon and label written for that alert
    (GH #23).
  • pulldown-cmark-mdcat: Theme gained h2_marker-h6_marker and
    alert_note_label-alert_caution_label fields (all public Strings)
    controlling the text previously hardcoded in the renderer.
  • --toc prints a numbered table of contents, generated from the document's
    headings and nested by level, before its content. Entries link to
    FILE#slug (a GitHub-style anchor) via OSC 8 so that terminals and later
    viewers that resolve such anchors can jump to that heading; on standard
    input entries are plain text, since there's no file to link to.
  • --image-protocol/$MDCAT_IMAGE_PROTOCOL/defaults.image_protocol in
    ~/.config/mdcat/config.toml forces a specific inline image protocol
    (none, iterm2, kitty, or sixel), overriding terminal auto-detection.
    Useful inside tmux/screen, where the outer terminal's capabilities usually
    aren't visible to auto-detection. Precedence: --image-protocol wins over
    $MDCAT_IMAGE_PROTOCOL, which wins over the config default.
  • --tabs/defaults.tabs in ~/.config/mdcat/config.toml expands literal
    tabs in the input to spaces, using the given tab stop width, before
    parsing. Off by default, so tabs pass through unchanged; without this, a
    tab inside text content throws off line-wrapping and alignment width
    calculations, since terminals render it as jumping to the next tab stop
    rather than occupying a single column.

Fixed

  • Syntax-highlighted fenced code blocks nested inside list items (or other
    indented blocks) lost their indentation on every line after the first,
    because only untagged (non-highlighted) code blocks re-applied indentation
    after each line.
  • Inline images (badges, icons) rendered too small on Sixel and iTerm2, only
    filling part of their allotted terminal row, since they were sent at
    native pixel resolution rather than scaled to a whole number of cell
    rows. Sixel images also drifted into a descending staircase when several
    appeared in a row (e.g. consecutive README badges), and iTerm2 never
    applied any explicit sizing at all (GH #22).

Don't miss a new mdcat release

NewReleases is sending notifications on new releases.