Subject: bug#72745: `bash-mode` doesn't recognize comments inside command substitution

From: "shynur ." <[email-masked]>
Date: Wed, 21 Aug 2024 13:02:24 +0000

Reproduce:
  1. echo -e 'echo $(echo 42  # print 42)\n)' > /tmp/a.bash
     Content of `/tmp/a.bash`:
          echo $(echo 42  # print 42)                                                                                         
          )
  2. emacs -Q, version 29.4
  3. eval: (set-face-italic font-lock-comment-face t)
  4. Open file `/tmp/a.bash`.

Only the first `)` is italic; "# print 42" is not.