Support disabling section numbers in preview.

This commit is contained in:
CismonX 2021-04-27 18:36:25 +08:00
parent ba9e6a6b2a
commit 464685fda9
Signed by: cismonx
GPG Key ID: 3094873E29A482FB
3 changed files with 10 additions and 0 deletions

View File

@ -192,6 +192,11 @@
"default": false,
"description": "Suppress node separators in preview."
},
"texinfo.preview.noNumberSections": {
"type": "boolean",
"default": false,
"description": "Do not display chapter and section numbers in preview"
},
"texinfo.preview.noValidation": {
"type": "boolean",
"default": false,

View File

@ -64,6 +64,10 @@ export default class Options {
return this.getBoolean('preview.noHeaders');
}
get noNumberSections() {
return this.getBoolean('preview.noNumberSections');
}
get noValidation() {
return this.getBoolean('preview.noValidation');
}

View File

@ -36,6 +36,7 @@ export default class Converter {
const options = ['-o-', '--no-split', '--html', `--error-limit=${this.options.errorLimit}`,
`--init-file=${this.initFile}`, '-D', `__vscode_texinfo_image_uri_base ${newPath}`];
this.options.noHeaders && options.push('--no-headers');
this.options.noNumberSections && options.push('--no-number-sections');
this.options.noValidation && options.push('--no-validate');
this.options.noWarnings && options.push('--no-warn');
if (insertScript !== undefined) {