summaryrefslogtreecommitdiff
path: root/support/make4ht/filters/make4ht-cleanspan-nat.lua
blob: 896132160c1673531c39cb630e6a9817ee951743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- cleanspan function submitted by Nat Kuhn 
-- http://www.natkuhn.com/

local function filter(s)
    local pattern = "(<span%s+([^>]+)>[^<]*)</span>(%s*)<span%s+%2>"
    repeat
      s, n = s:gsub(pattern, "%1%3")
    until n == 0
    return s
end

return filter