mdsmith
Esc
    v0.52.0 GitHub
    MDS009 whitespace ready

    MDS009: single-trailing-newline

    File must end with exactly one newline character.

    # Config

    Enable:

    rules:
      single-trailing-newline: true

    Disable:

    rules:
      single-trailing-newline: false

    # Examples

    # Good

    # Title
    
    Content here.

    The file ends with exactly one \n after the last line.

    # Bad

    # Title
    
    Content here.

    The file has no trailing newline after the last line. The <?include?> output looks identical because the wrap always adds a newline, but the actual fixture file (bad/default.md) ends without one — that missing byte is what the rule detects.

    # Meta-Information