cripslock

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 9c5255940139af2c8c70cb7fb56e5c5abf02b149
parent 0f4da2662817a8fd36eacce416074ca87adcfc72
Author: Daniel Barlow <dan@telent.net>
Date:   Fri,  8 Aug 2025 18:47:15 +0100

make links from bare URLs

Diffstat:
Msite.fnl | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/site.fnl b/site.fnl @@ -23,7 +23,10 @@ (or title (. post :title))) (or title slug))))] (-> md - (lcmark.convert "html" { :yaml_parser #($1) }) + (lcmark.convert "html" { :yaml_parser #($1) + }) + (string.gsub "([%s\n>])(https-%:%/%/.-)([%s\n<])" + #(%% "%s <a href=%q>%s</a> %s" $1 $2 $2 $3)) (string.gsub "%[%[([%w_-]+)|(.-)%]%]" subst-links) (string.gsub "%[%[([%w_-]+)%]%]" subst-links))))