diff options
| author | John MacFarlane <[email protected]> | 2026-01-20 10:45:56 +0100 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2026-01-20 10:45:56 +0100 |
| commit | a14198fb44626aef81fdb6abd542ba6cdff2535c (patch) | |
| tree | 78cc7a094b0a6c015710eaca9107400180db5ee4 | |
| parent | 0f1cc8bca1b22419b03170b55c0d19d59617407d (diff) | |
Wasm: dpi and improve tabs.
| -rw-r--r-- | wasm/index.html | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/wasm/index.html b/wasm/index.html index 5e4ddf5a0..dab4735d5 100644 --- a/wasm/index.html +++ b/wasm/index.html @@ -820,6 +820,7 @@ <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> + <option value="preserve">Preserve tabs</option> </select> </div> <div class="form-group"> @@ -830,11 +831,9 @@ <option value="crlf">CRLF (Windows)</option> </select> </div> - </div> - <div class="options-grid" style="margin-top: 0.75rem;"> - <div class="checkbox-group"> - <input type="checkbox" id="opt-preserve-tabs" v-model="opts.preserveTabs" /> - <label for="opt-preserve-tabs">Preserve tabs</label> + <div class="form-group"> + <label for="opt-dpi">DPI (for images)</label> + <input type="number" id="opt-dpi" v-model="opts.dpi" placeholder="96" min="1" style="width: 80px;" /> </div> </div> </div> @@ -1453,9 +1452,9 @@ extractMedia: false, tocDepth: '3', shiftHeading: '0', - preserveTabs: false, tabStop: '4', eol: '', + dpi: '', stripComments: false, trackChanges: '', citationMethod: '', @@ -2253,10 +2252,14 @@ 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.preserveTabs) opts['preserve-tabs'] = true; - const tabStop = parseInt(this.opts.tabStop); - if (tabStop !== 4) opts['tab-stop'] = tabStop; + 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.eol) opts.eol = this.opts.eol; + if (this.opts.dpi) opts.dpi = parseInt(this.opts.dpi); if (this.opts.stripComments) opts['strip-comments'] = true; // Track changes |
