Skip to content

Commit ed5e789

Browse files
committed
Trim spaces from start/end of refs
1 parent 8d6cd64 commit ed5e789

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

themes/shortbread_v1/topics/streets.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ local set_ref_attributes = function(a, t)
225225
local cols = 0
226226

227227
for word in string.gmatch(t.ref, "([^;]+);?") do
228+
word = word:gsub('^[%s]+', '', 1):gsub('[%s]+$', '', 1)
228229
rows = rows + 1
229230
cols = math.max(cols, string.len(word))
230231
table.insert(refs, word)

themes/shortbread_v1_gen/topics/streets.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ local set_ref_attributes = function(a, t)
262262
local cols = 0
263263

264264
for word in string.gmatch(t.ref, "([^;]+);?") do
265+
word = word:gsub('^[%s]+', '', 1):gsub('[%s]+$', '', 1)
265266
rows = rows + 1
266267
cols = math.max(cols, string.len(word))
267268
table.insert(refs, word)

0 commit comments

Comments
 (0)