Let us be pedantic and put the `$` on a line of its own, the way you did for `^`.
(I would also write "whitespace" in full rather than WS)