From f4a700dde5c34dad7972e1e72356a089b9cd45d0 Mon Sep 17 00:00:00 2001 From: CLRafaelR Date: Mon, 4 Jul 2022 18:19:45 +0900 Subject: [PATCH] Two [%u%d] to one [%u%d] to resolve issue #12 --- pandoc-ling.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandoc-ling.lua b/pandoc-ling.lua index 367f19e..1762079 100644 --- a/pandoc-ling.lua +++ b/pandoc-ling.lua @@ -444,7 +444,7 @@ end function formatGlossLine (s) -- turn uppercase in gloss into small caps local split = {} - for lower,upper in string.gmatch(s, "(.-)([%u%d][%u%d]+)") do + for lower,upper in string.gmatch(s, "(.-)([%u%d]+)") do if lower ~= "" then lower = pandoc.Str(lower) table.insert(split, lower) @@ -452,7 +452,7 @@ function formatGlossLine (s) upper = pandoc.SmallCaps(pandoc.text.lower(upper)) table.insert(split, upper) end - for leftover in string.gmatch(s, "[%u%d][%u%d]+(.-[^%u%s])$") do + for leftover in string.gmatch(s, "[%u%d]+(.-[^%u%s])$") do leftover = pandoc.Str(leftover) table.insert(split, leftover) end