diff --git a/wasm/index.html b/wasm/index.html
index cc8fab797..9032fd975 100644
--- a/wasm/index.html
+++ b/wasm/index.html
@@ -58,6 +58,8 @@
.header h1 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.header .tagline { color: var(--gray-400); font-size: 0.8rem; }
+ .header .help-link { color: var(--gray-400); font-size: 0.85rem; text-decoration: none; }
+ .header .help-link:hover { color: white; }
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
@@ -431,7 +433,10 @@
word-wrap: break-word;
}
- .output-actions { display: flex; gap: 1rem; margin-top: 1rem; }
+ .output-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
+ .verbosity-control { flex-direction: row; margin-left: auto; }
+ .verbosity-control label { font-size: 0.85rem; margin-right: 0.5rem; }
+ .verbosity-control select { padding: 0.5rem; font-size: 0.85rem; }
.download-btn {
display: inline-flex;
@@ -529,6 +534,7 @@
@@ -611,7 +617,7 @@
-
+
📄
{{ name }}
{{ formatFileSize(files[name].size) }}
@@ -681,11 +687,14 @@
-
+
+
+
+
-
{{ msg.text }}
+
{{ msg.text }}
{{ outputPreview }}
@@ -1328,6 +1345,8 @@
diff --git a/wasm/index.js b/wasm/index.js
index 2a11c7069..3c32926a4 100644
--- a/wasm/index.js
+++ b/wasm/index.js
@@ -66,6 +66,7 @@ window.pandocApp = function() {
tocDepth: '3',
shiftHeading: '0',
tabStop: '4',
+ preserveTabs: false,
eol: '',
dpi: '',
numberOffset: '',
@@ -151,6 +152,7 @@ window.pandocApp = function() {
outputFilenameActual: '',
outputPreview: '',
messages: [],
+ verbosity: 'info',
copyBtnText: '📋 Copy to Clipboard',
mediaZip: null,
@@ -395,6 +397,14 @@ window.pandocApp = function() {
get supportsTopLevelDivision() { return this.topLevelDivisionFormats.includes(this.effectiveOutputFormat); },
get supportsListOf() { return this.listOfFormats.includes(this.effectiveOutputFormat); },
get isBinaryOutput() { return this.binaryFormats.includes(this.effectiveOutputFormat); },
+ get filteredMessages() {
+ if (this.verbosity === 'error') {
+ return this.messages.filter(m => m.type === 'error');
+ } else if (this.verbosity === 'warning') {
+ return this.messages.filter(m => m.type === 'error' || m.type === 'warning');
+ }
+ return this.messages;
+ },
get suggestedVariables() {
const fmt = this.effectiveOutputFormat;
@@ -1097,12 +1107,9 @@ window.pandocApp = function() {
if (this.opts.fileScope) opts['file-scope'] = true;
const shiftHeading = parseInt(this.opts.shiftHeading);
if (shiftHeading !== 0) opts['shift-heading-level-by'] = shiftHeading;
- if (this.opts.tabStop === 'preserve') {
- opts['preserve-tabs'] = true;
- } else {
- const tabStop = parseInt(this.opts.tabStop);
- if (tabStop !== 4) opts['tab-stop'] = tabStop;
- }
+ if (this.opts.preserveTabs) opts['preserve-tabs'] = true;
+ const tabStop = parseInt(this.opts.tabStop);
+ if (tabStop !== 4) opts['tab-stop'] = tabStop;
if (this.opts.eol) opts.eol = this.opts.eol;
if (this.opts.dpi) opts.dpi = parseInt(this.opts.dpi);
if (this.opts.numberOffset.trim()) {