feat(cli): --trust flag for trusting cli input (#3339)

* feat: allow trusting all inputs via cli flag

The trust option has much finer grained control, which is hard to
specify on the command line, so expose just a single boolean flag, which
changes trust from false (default) to true.

* Rename to trust

* Add -T

* Revise documentation

Fixes #2428 
Co-authored-by: summersz <rasummersr@gmail.com>
Co-authored-by: Erik Demaine <edemaine@mit.edu>
This commit is contained in:
Ng Zhi An
2021-10-25 18:11:44 -07:00
committed by GitHub
parent b1e24f268d
commit 503f7d79f9

4
cli.js
View File

@@ -43,7 +43,7 @@ const program = require("commander")
"instead of LaTeX's one-argument \\color mode change.")
.option("-S, --strict",
"Turn on strict / LaTeX faithfulness mode, which throws an error " +
"if the input uses features that are not supported by LaTeX")
"if the input uses features that are not supported by LaTeX.")
.option("-s, --max-size <n>",
"If non-zero, all user-specified sizes, e.g. in " +
"\\rule{500em}{500em}, will be capped to maxSize ems. " +
@@ -63,6 +63,8 @@ const program = require("commander")
}, [])
.option("-f, --macro-file <path>",
"Read macro definitions, one per line, from the given file.")
.option("-T, --trust",
"Trust the input, enabling all HTML features such as \\url.")
.option("-i, --input <path>", "Read LaTeX input from the given file.")
.option("-o, --output <path>", "Write html output to the given file.");