1.0.2: converter searches no subfolders, safer filters, forms, links and watermark

A document at the root of a checkout of 68377 folders needed 56 minutes,
because the converter named the suite, the document folder and the build folder
with `//` in TEXINPUTS; it now names them without recursion and the same
document converts in 11.5 seconds. A file below the document no longer replaces
a package of TeX Live.

The security review of the pending changes found four defects, each fixed with
a test proven red against the old files and green against the new ones twice:
an HTML table read in an empty sandbox, so an iframe opens no address; form
labels written through the LaTeX writer, so they are set as text; the form
pattern scans a line once instead of quadratically; a kept build folder no
longer lays the links of an earlier drawing over a new one. The form tests
remove the PDF of an earlier run before each conversion.

Also carried: forms out of Markdown, link colours from the company, clickable
links in prose, HTML tables and SVG drawings, the watermark, and the further
changes of 1.0.1 and 1.0.2 in the CHANGELOG.

npm test: 1232 of 1232 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Marc WäckerlinandClaude Opus 5.5 committed 2026-11-14 12:14:55 +01:00
1 parent adc58e19d7
commit d7aac52ac7
28 files changed
+3918 -137

No files matched your search

+18 -4
View File
@@ -67,11 +67,25 @@ function Image(image)
end
end
-- A picture alone in its paragraph, and a raster picture is alone with the
-- mark of its kind in front of it: pandoc runs the function above over every
-- picture before it looks at a paragraph, so the paragraph of a photograph
-- holds two things by then. Counted as one, it lost its caption until
-- 2026-10-05.
local function alone(content)
if #content == 1 then return content[1], nil end
if #content == 2 and content[1].t == 'RawInline'
and content[1].text == '\\businessbitmap' then
return content[2], content[1]
end
return nil, nil
end
function Para(para)
if #para.content ~= 1 then return nil end
local image = para.content[1]
if image.t ~= 'Image' or #image.caption == 0 then return nil end
local image, mark = alone(para.content)
if not image or image.t ~= 'Image' or #image.caption == 0 then return nil end
local shown = mark and pandoc.Plain{ mark, image } or pandoc.Plain{ image }
return pandoc.Figure(
pandoc.Blocks{ pandoc.Plain{ image } },
pandoc.Blocks{ shown },
{ long = pandoc.Blocks{ pandoc.Plain(image.caption) } })
end