Module:Chabad Days: Difference between revisions

Follow redirects, heading variants, Nissan spelling
Strip footnotes from box lines
Line 18: Line 18:


local function cleanLine(line)
local function cleanLine(line)
line = line:gsub('<ref[^>]-/>', ''):gsub('<ref.-</ref>', '')
-- "5587 (10/12/1826 by the [[Gentile Calendar|secular count]]) - text"  ->  "[[5587]] (1826) – Text"
-- "5587 (10/12/1826 by the [[Gentile Calendar|secular count]]) - text"  ->  "[[5587]] (1826) – Text"
local b1, year, b2, paren, b3, text = line:match("^%*+%s*('*)(%d%d%d%d)('*)%s*%((.-)%)%s*('*)%s*%-%s*(.*)$")
local b1, year, b2, paren, b3, text = line:match("^%*+%s*('*)(%d%d%d%d)('*)%s*%((.-)%)%s*('*)%s*%-%s*(.*)$")