]> source.dussan.org Git - gitea.git/commit
Strip trailing newline in markdown code copy (#29019) (#29022)
authorGiteabot <teabot@gitea.io>
Thu, 1 Feb 2024 21:06:21 +0000 (05:06 +0800)
committerGitHub <noreply@github.com>
Thu, 1 Feb 2024 21:06:21 +0000 (21:06 +0000)
commit5d1abdce3ea16064fe22e9bdaa436033bdd6698a
treef73d33b67462d977f1bee8c8140ec70a36001cef
parent2588d73ebfa39bbc5926e669c76a702c34daf7cd
Strip trailing newline in markdown code copy (#29019) (#29022)

Behaviour now matches GH. Safeguard added in the for loop because
`textContent` may be null in which case it does not make sense to render
the copy button.

Co-authored-by: silverwind <me@silverwind.io>
web_src/js/markup/codecopy.js