From 344a1b5725826e83bdd6186c5dea7dd19b95d29f Mon Sep 17 00:00:00 2001 From: Michael Behrens Date: Wed, 7 Oct 2026 11:13:48 +0200 Subject: [PATCH] Make shortbread_v1 work with lua 5.5 --- themes/shortbread_v1/topics/streets.lua | 6 +++--- themes/shortbread_v1_gen/topics/streets.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/themes/shortbread_v1/topics/streets.lua b/themes/shortbread_v1/topics/streets.lua index 8ad5af9..11e244e 100644 --- a/themes/shortbread_v1/topics/streets.lua +++ b/themes/shortbread_v1/topics/streets.lua @@ -241,10 +241,10 @@ local set_ref_attributes = function(a, t) local cols = 0 for word in string.gmatch(t.ref, "([^;]+);?") do - word = word:gsub('^[%s]+', '', 1):gsub('[%s]+$', '', 1) + local trimmed = word:gsub('^[%s]+', '', 1):gsub('[%s]+$', '', 1) rows = rows + 1 - cols = math.max(cols, string.len(word)) - table.insert(refs, word) + cols = math.max(cols, string.len(trimmed)) + table.insert(refs, trimmed) end a.ref = table.concat(refs, '\n') diff --git a/themes/shortbread_v1_gen/topics/streets.lua b/themes/shortbread_v1_gen/topics/streets.lua index 25db5bf..047857f 100644 --- a/themes/shortbread_v1_gen/topics/streets.lua +++ b/themes/shortbread_v1_gen/topics/streets.lua @@ -278,10 +278,10 @@ local set_ref_attributes = function(a, t) local cols = 0 for word in string.gmatch(t.ref, "([^;]+);?") do - word = word:gsub('^[%s]+', '', 1):gsub('[%s]+$', '', 1) + local trimmed = word:gsub('^[%s]+', '', 1):gsub('[%s]+$', '', 1) rows = rows + 1 - cols = math.max(cols, string.len(word)) - table.insert(refs, word) + cols = math.max(cols, string.len(trimmed)) + table.insert(refs, trimmed) end a.ref = table.concat(refs, '\n')