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:
1 parent
adc58e19d7
commit
d7aac52ac7
28 files changed
+3918
-137
No files matched your search
+17
-3
@@ -34,9 +34,11 @@ HEIGHTS = (
|
||||
("logoheight", r"\\newcommand\{\\pacta@logoheight\}\{([^}]*)\}",
|
||||
r"\\newcommand\{\\business@logoheight\}\{([^}]*)\}",
|
||||
"the logo of the page head"),
|
||||
("titlelogoheight", r"\\newcommand\{\\pacta@titlelogoheight\}\{([^}]*)\}",
|
||||
r"\\newcommand\{\\business@titlelogoheight\}\{([^}]*)\}",
|
||||
"the logo of the title block"),
|
||||
)
|
||||
FAMILY_HEIGHTS = (
|
||||
("logoheight", "2em",
|
||||
r"\\newcommand\{\\business@logoheight\}\{([^}]*)\}",
|
||||
"the logo of the page head"),
|
||||
)
|
||||
# The three proportions of the lockup, as the origin writes them: the name at
|
||||
# 0.8 of the height, the gap beside it at 0.1, the gap over the address at 0.1.
|
||||
@@ -73,11 +75,23 @@ def main():
|
||||
check.that(mine is not None and abs(float(mine) - value) < 0.0001,
|
||||
f"{what}: this suite says {mine}, the family {value}")
|
||||
|
||||
# The height of the page head is a value of the family as well, and it
|
||||
# stands here as one: since 2026-10-05 the origin is a configuration of
|
||||
# this suite and carries no height of its own to read.
|
||||
for name, value, pattern, what in FAMILY_HEIGHTS:
|
||||
mine = first(pattern, ours)
|
||||
check.that(mine == value,
|
||||
f"{what}: this suite says {mine}, the family {value}")
|
||||
|
||||
origin = support.run(["kpsewhich", "pacta.sty"]).stdout.strip()
|
||||
if not origin or not os.path.exists(origin):
|
||||
print(" pacta.sty is not installed; the heights were not compared")
|
||||
return check.done()
|
||||
theirs = read(origin)
|
||||
if "\\RequirePackage{business-identity}" in theirs:
|
||||
print(" pacta.sty is a configuration of this suite; its heights are "
|
||||
"the ones of this suite and were not compared again")
|
||||
return check.done()
|
||||
for name, there, here, what in HEIGHTS:
|
||||
want = first(there, theirs)
|
||||
mine = first(here, ours)
|
||||
|
||||
Reference in new issue
Block a user