whitespace: Include empty final line in BoB empty match

* lisp/whitespace.el (whitespace-empty-at-bob-regexp): Include any
last line trailing whitespace in the BoB empty line match to ensure
that those characters get highlighted.
This commit is contained in:
Richard Hansen 2022-06-28 15:05:04 -04:00 committed by Lars Ingebrigtsen
parent 99e8faa725
commit 395786f42b

View file

@ -730,7 +730,7 @@ Used when `whitespace-style' includes `indentation',
:group 'whitespace)
(defcustom whitespace-empty-at-bob-regexp "\\`\\(\\([ \t]*\n\\)+\\)"
(defcustom whitespace-empty-at-bob-regexp "\\`\\([ \t\n]*\\(?:\n\\|$\\)\\)"
"Specify regexp for empty lines at beginning of buffer.
Used when `whitespace-style' includes `empty'."