commit f09e46e681b0896cabb5c4456000d14db71d98ea parent 49582694da43fe00baf1c34a52d5c7037804deb3 Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Sat, 8 Jun 2024 17:51:50 +0200 feat: expand git-clone anchor to entire string Diffstat:
M | bin/git_update_repo_html.sh | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh @@ -95,7 +95,7 @@ INJEXP="s/^(<a\ href=\"\.{0,2}\/*log.html\">)/<a\ href=\"\/${2}\/${3}\/index.htm find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \; # Replace "git clone" href -INJEXP="s/git clone <a href=\"(https:\/\/.*?\.git)\">/git clone <a href='javascript:navigator.clipboard.writeText(\"git clone \1\");alert(\"git clone \1 copied to your clipboard\")';>/" +INJEXP="s/(git\ clone=\ <a href=\"(https:\/\/.*?\.git)\">/<a href='javascript:navigator.clipboard.writeText(\"\1 \2\");alert(\"\1 \2 copied to your clipboard\")';>\1/" find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \; # link assets