1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[dump] Added the "document.dump.scripting_enabled" option

This commit is contained in:
Witold Filipczyk 2024-08-15 16:47:41 +02:00
parent 271569c409
commit 8b57c0b617
2 changed files with 7 additions and 1 deletions

View File

@ -790,6 +790,10 @@ static union option_info config_options_info[] = {
N_("Whether to print references (URIs) of document links "
"in dump output.")),
INIT_OPT_BOOL("document.dump", N_("Scripting enabled"),
"scripting_enabled", OPT_ZERO, 1,
N_("Whether to call scripting pre_format_hooks when dump.")),
INIT_OPT_BOOL("document.dump", N_("Terminal hyperlinks"),
"terminal_hyperlinks", OPT_ZERO, 0,
N_("Whether to add terminal hyperlinks to dump output. See #198 in github.")),

View File

@ -504,7 +504,9 @@ dump_formatted(int fd, struct download *download, struct cache_entry *cached)
o.dump = 1;
#ifdef CONFIG_SCRIPTING
maybe_pre_format_html(cached, NULL);
if (get_opt_bool("document.dump.scripting_enabled", NULL)) {
maybe_pre_format_html(cached, NULL);
}
#endif
init_vs(&vs, cached->uri, -1);