Skip to content

Commit

Permalink
Merge pull request #13 from CLRafaelR/one-char-abbrev
Browse files Browse the repository at this point in the history
Two [%u%d] to one [%u%d] to resolve issue #12
  • Loading branch information
cysouw authored Oct 7, 2022
2 parents 04ad638 + f4a700d commit 7c1997b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandoc-ling.lua
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,15 @@ 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)
end
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
Expand Down

0 comments on commit 7c1997b

Please sign in to comment.