From 4c61414d3fe57829e177151939a97d72d603d636 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 8 Sep 2026 18:23:10 +0100 Subject: fix closing ``` --- http/bin/gmi2upphtml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'http') diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml index ace3ef2..433aa8d 100755 --- a/http/bin/gmi2upphtml +++ b/http/bin/gmi2upphtml @@ -105,7 +105,12 @@ while read line do if [ $is_in_preformatted_block -ne 0 ] then - echo "$(escape_upphtml "${line}")" + if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ] + echo "" + is_in_preformatted_block=0 + else + echo "$(escape_upphtml "${line}")" + fi continue fi @@ -171,15 +176,9 @@ do if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ] then - if [ $is_in_preformatted_block -eq 0 ] - then - close_all_open_blocks_except pre - echo "
"
-      is_in_preformatted_block=1
-    else
-      echo "
" - is_in_preformatted_block=0 - fi + close_all_open_blocks_except pre + echo "
"
+    is_in_preformatted_block=1
     continue
   fi
 
-- 
cgit v1.2.3


From 1816e9e0a11f20d2223600dfabba5263a1c2ce55 Mon Sep 17 00:00:00 2001
From: Joe Carstairs 
Date: Tue, 8 Sep 2026 18:25:17 +0100
Subject: microlog and blog indices don't use .html in post links

---
 http/src/blog.upphtml     | 2 +-
 http/src/microlog.upphtml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'http')

diff --git a/http/src/blog.upphtml b/http/src/blog.upphtml
index 8c0e429..f96f1df 100644
--- a/http/src/blog.upphtml
+++ b/http/src/blog.upphtml
@@ -53,7 +53,7 @@ for post in $POSTS; do if [ "$(echo "${post}" | cut -c1-4)" = "$year" ]; then
 title="$(grep "^export TITLE=" "${SRC}/blog/${post}" | cut -c15-)"
 title="$(echo ${title} | cut -c1-$(( ${#title} - 16 )) )"
 date_published="$(echo "${post}" | cut -c1-10)"
-href="${SITE_URL}/blog/$(echo "$post" | cut -c1-10).html"
+href="${SITE_URL}/blog/$(echo "$post" | cut -c1-10)"
 #!
 
 
  • diff --git a/http/src/microlog.upphtml b/http/src/microlog.upphtml index aa3cfea..55c1dfc 100644 --- a/http/src/microlog.upphtml +++ b/http/src/microlog.upphtml @@ -55,7 +55,7 @@ for post in $POSTS; do if [ "$(echo "${post}" | cut -c1-4)" = "$year" ]; then title="$(grep "^export TITLE=" "${SRC}/microlog/${post}" | cut -c15-)" title="$(echo "${title}" | cut -c1-$(( ${#title} - 16)) )" date_published="$(echo "${post}" | cut -c1-10)" -href="${SITE_URL}/microlog/$(echo ${post} | cut -c1-$(( ${#post} - 17 )) ).html" +href="${SITE_URL}/microlog/$(echo ${post} | cut -c1-$(( ${#post} - 17 )) )" #!
  • -- cgit v1.2.3 From 15240a17d06ebf8d95d86896bc87ad9c633ea71d Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 8 Sep 2026 18:26:26 +0100 Subject: syntax error in gmi2upphtml (forgot then) --- http/bin/gmi2upphtml | 1 + 1 file changed, 1 insertion(+) (limited to 'http') diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml index 433aa8d..044bedd 100755 --- a/http/bin/gmi2upphtml +++ b/http/bin/gmi2upphtml @@ -106,6 +106,7 @@ do if [ $is_in_preformatted_block -ne 0 ] then if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ] + then echo "
  • " is_in_preformatted_block=0 else -- cgit v1.2.3 From f5602bab371a3f3a1fb5aced4ec4822c35a9ca5d Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 8 Sep 2026 18:48:15 +0100 Subject: omit first line break in preformatted block --- http/bin/gmi2upphtml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'http') diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml index 044bedd..3d36409 100755 --- a/http/bin/gmi2upphtml +++ b/http/bin/gmi2upphtml @@ -5,6 +5,7 @@ post_title="${POST_TITLE:-}" is_in_list=0 is_in_link_block=0 is_in_preformatted_block=0 +is_first_line_of_preformatted_block=0 is_in_blockquote=0 if_in_list_then_close() @@ -105,12 +106,17 @@ while read line do if [ $is_in_preformatted_block -ne 0 ] then + if [ $is_first_line_of_preformatted_block -ne 0 ] + then + prefix="
    "
    +      is_first_line_of_preformatted_block=0
    +    fi
         if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ]
         then
    -      echo "
    " + echo "${prefix}" is_in_preformatted_block=0 else - echo "$(escape_upphtml "${line}")" + echo "${prefix}$(escape_upphtml "${line}")" fi continue fi @@ -178,8 +184,8 @@ do if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ] then close_all_open_blocks_except pre - echo "
    "
         is_in_preformatted_block=1
    +    is_first_line_of_preformatted_block=1
         continue
       fi
     
    -- 
    cgit v1.2.3
    
    
    From dce85da71fe9ec8b41ad57ea86bbac448b143afe Mon Sep 17 00:00:00 2001
    From: Joe Carstairs 
    Date: Tue, 8 Sep 2026 21:35:13 +0100
    Subject: set prefix to nothing if not first line of ```
    
    ---
     http/bin/gmi2upphtml | 2 ++
     1 file changed, 2 insertions(+)
    
    (limited to 'http')
    
    diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml
    index 3d36409..afaf9ef 100755
    --- a/http/bin/gmi2upphtml
    +++ b/http/bin/gmi2upphtml
    @@ -110,6 +110,8 @@ do
         then
           prefix="
    "
           is_first_line_of_preformatted_block=0
    +    else
    +      prefix=""
         fi
         if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ]
         then
    -- 
    cgit v1.2.3