pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit 57e01a8bb4f0ecf66833160475c27ba78e38b338
parent da2f1410b8ba3706ab1b8e3608ee88290c9fb453
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat,  2 Nov 2024 19:19:18 +0100

feat: do not use JS for copying clone line

Diffstat:
Mbin/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 @@ -204,7 +204,7 @@ INJEXP="s/(<h1>)(${3})(<\/h1>)/\1<a\ href=\"\/${2}\/\">${2}<\/a>\ \/\ <a\ href=\ 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)\">/<a href='javascript:copy_to_clipboard(\"\1 \2\");'>\1 /g" +INJEXP="s/(git\ clone)\ <a href=\"([^\"]+)\">.*?<\/a>/<code>\1 \2<\/code>/g" find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \; # Inject copy-codeblock for file previews (needs to be run inside SHELL)