But reading the [POSIX spec](https://pubs.opengroup.org/onlinepubs/007904875/utilities/xcu_chap02.html) suggests the `<newline>` should be removed before token recognition which is when the comment is recognised, so the highlighting is correct for POSIX shells. `</language lawyering>`
Since there is only one highlighter for all "shellish" things it won't match all of their deviant behaviours, so I guess its up to the maintainer of the lexer in Scintilla which it matches, POSIX or bash (as most popular) or what.