blob: 4705cb0893a3c35800bd1b5b8747414a22445d17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# This wraps <pre> text too when "W" is pressed.
# (main toggle-wrap-text)
diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c
index 6470c54..a40a4ef 100644
--- a/src/document/html/renderer.c
+++ b/src/document/html/renderer.c
@@ -1801,7 +1801,7 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
renderer_context.nobreak = 0;
- if (!(html_context->options->wrap || html_is_preformatted())) {
+ if (html_context->options->wrap || !html_is_preformatted()) {
while (part->cx > overlap(par_format)
&& part->cx > par_format.leftmargin) {
int x = split_line(html_context);
@@ -1822,9 +1822,7 @@ put_chars(struct html_context *html_context, unsigned char *chars, int charslen)
int_lower_bound(&part->max_width, part->xa
+ par_format.leftmargin + par_format.rightmargin
- (chars[charslen - 1] == ' '
- && !html_is_preformatted()));
- return;
-
+ && (html_context->options->wrap || !html_is_preformatted())));
}
#undef overlap
|