adbb81edbcdfde3cde3c27f9756a6e18fd3abdb1 lrnassar Mon Mar 9 09:27:41 2026 -0700 Small fixes to the lua rules that were messing up the column spacing for markdown tables, and a double escaping when links were placed inside tables, refs #36894 diff --git docs/staticPage.lua docs/staticPage.lua index 5aa4cada964..b02a1eb7de8 100644 --- docs/staticPage.lua +++ docs/staticPage.lua @@ -207,31 +207,30 @@ table.insert(refs, ref) end return table.concat(refs, "") end function Link(s, src, tit, attr) if string.sub(src, 1, 7)=="mailto:" then src = "mailto:" .. obfuscate(string.sub(src, 7), 7) -- assume that the link label is an email address if it contains an @ character if string.match(s, "%@")~=nil then s = obfuscate(s) end else src = escape(src, true) tit = escape(tit, true) - s = escape(s, true) end return "" .. s .. "" end function Image(s, src, tit, attr) return "" end function Code(s, attr) return "" .. escape(s) .. "" @@ -378,31 +377,31 @@ -- Caption is a string, aligns is an array of strings, -- widths is an array of floats, headers is an array of -- strings, rows is an array of arrays of strings. function Table(caption, aligns, widths, headers, rows) local buffer = {} local function add(s) table.insert(buffer, s) end add("") if caption ~= "" then add("") end if widths and widths[1] ~= 0 then for _, w in pairs(widths) do - add('') + add('') end end local header_row = {} local empty_header = true for i, h in pairs(headers) do local align = html_align(aligns[i]) table.insert(header_row,'') empty_header = empty_header and h == "" end if empty_header then head = "" else add('') for _,h in pairs(header_row) do add(h)
" .. caption .. "
' .. h .. '