>_ IzzyLab

Topic breakdown

Trailing whitespace is invisible, but it breaks linters, diffs and sometimes configs themselves. It is removed with a substitution with an empty replacement, where the pattern is "whitespace characters pinned to the end of the line". The [[:blank:]] class covers both space and tab, and the $ anchor guarantees that only characters at the very end are affected: indentation at the start and spaces between words stay. For YAML this is critical — indentation defines nesting.

What's checked

  1. no trailing spaces or tabs
  2. text and indentation preserved

What it looks like