summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-08-25 13:27:36 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2022-08-25 13:27:36 -0700
commit42fe4d2e50cd0e731d6ab58a69c1bea5a2fc5ed6 (patch)
treea37b7b76a64512a2ba085677092e5530ddcc39d1
parentea99078f9953aba5b2293386fe15030d12112822 (diff)
trypandoc: ensure that support file boxes removed when params cleared.
-rw-r--r--trypandoc/trypandoc.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/trypandoc/trypandoc.js b/trypandoc/trypandoc.js
index aaed60704..3de0cde99 100644
--- a/trypandoc/trypandoc.js
+++ b/trypandoc/trypandoc.js
@@ -128,6 +128,10 @@ function setFormFromParams() {
document.getElementById("standalone").checked = params.standalone;
document.getElementById("citeproc").checked = params.citeproc;
document.getElementById("html-math-method").value = params["html-math-method"];
+ const files = document.querySelectorAll(".file");
+ files.forEach(file => {
+ file.remove();
+ });
for (const filename in params.files) {
addFile(filename, params.files[filename]);
}