diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-02-04 23:39:45 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-02-05 15:53:01 +0000 |
commit | 12a4f4bbce1c56b70373ac1a619765c0d9540784 (patch) | |
tree | a989168fed57d3d9a324eb72b397b7dc253f6d19 /fitz | |
parent | 4d5fa0a3970abdc8522a098fc83263feed16bdd0 (diff) | |
download | mupdf-12a4f4bbce1c56b70373ac1a619765c0d9540784.tar.xz |
Tweak HTML output.
Send blocks as paragraphs, rather than lines. Send lines as spans.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/dev_text.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fitz/dev_text.c b/fitz/dev_text.c index e5b2c927..10096fcf 100644 --- a/fitz/dev_text.c +++ b/fitz/dev_text.c @@ -626,11 +626,11 @@ fz_print_text_page_html(fz_context *ctx, fz_output *out, fz_text_page *page) for (block_n = 0; block_n < page->len; block_n++) { block = &page->blocks[block_n]; - fz_printf(out, "<div class=\"block\">\n"); + fz_printf(out, "<div class=\"block\"><p>\n"); for (line_n = 0; line_n < block->len; line_n++) { line = &block->lines[line_n]; - fz_printf(out, "<p>"); + fz_printf(out, "<span>"); style = NULL; for (span_n = 0; span_n < line->len; span_n++) @@ -661,9 +661,9 @@ fz_print_text_page_html(fz_context *ctx, fz_output *out, fz_text_page *page) } if (style) fz_print_style_end(out, style); - fz_printf(out, "</p>\n"); + fz_printf(out, "</span>\n"); } - fz_printf(out, "</div>\n"); + fz_printf(out, "</p></div>\n"); } fz_printf(out, "</div>\n"); |