mirror of
https://github.com/rkd77/elinks.git
synced 2025-05-18 00:48:57 -04:00
[html] compress_empty_lines also in documents rewritten by js
This commit is contained in:
parent
f8e158309e
commit
2c4c31a084
@ -145,8 +145,8 @@ render_encoded_document(struct cache_entry *cached, struct document *document)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
compress_lines(struct document *document)
|
||||
void
|
||||
compress_empty_lines(struct document *document)
|
||||
{
|
||||
int minus = 0;
|
||||
int maxy = document->height;
|
||||
@ -277,7 +277,7 @@ render_document(struct view_state *vs, struct document_view *doc_view,
|
||||
render_encoded_document(cached, document);
|
||||
|
||||
if (!vs->plain && options->html_compress_empty_lines) {
|
||||
compress_lines(document);
|
||||
compress_empty_lines(document);
|
||||
}
|
||||
|
||||
sort_links(document);
|
||||
|
@ -17,6 +17,7 @@ struct screen_char;
|
||||
void render_document(struct view_state *, struct document_view *, struct document_options *);
|
||||
void render_document_frames(struct session *ses, int no_cache);
|
||||
struct conv_table *get_convert_table(char *head, int to_cp, int default_cp, int *from_cp, enum cp_status *cp_status, int ignore_server_cp);
|
||||
void compress_empty_lines(struct document *document);
|
||||
void sort_links(struct document *document);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -268,16 +268,21 @@ static void
|
||||
delayed_reload(void *data)
|
||||
{
|
||||
struct delayed_rel *rel = (struct delayed_rel *)data;
|
||||
struct session *ses = rel->ses;
|
||||
|
||||
assert(rel);
|
||||
struct session *ses = rel->ses;
|
||||
struct document *document = rel->document;
|
||||
|
||||
object_unlock(rel->document);
|
||||
object_unlock(document);
|
||||
|
||||
reset_document(rel->document);
|
||||
rel->document->links_sorted = 0;
|
||||
dump_xhtml(rel->cached, rel->document, 1 + rel->was_write);
|
||||
sort_links(rel->document);
|
||||
reset_document(document);
|
||||
document->links_sorted = 0;
|
||||
dump_xhtml(rel->cached, document, 1 + rel->was_write);
|
||||
|
||||
if (!ses->doc_view->vs->plain && document->options.html_compress_empty_lines) {
|
||||
compress_empty_lines(document);
|
||||
}
|
||||
|
||||
sort_links(document);
|
||||
draw_formatted(ses, 2);
|
||||
load_common(ses);
|
||||
mem_free(rel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user