mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[blockquote] Rewritten a bit. Refs #112
It does not crash on test file and shows > for pior test cases.
This commit is contained in:
parent
409a7ebea4
commit
d4a1ce5a38
@ -338,18 +338,19 @@ draw_blockquote_chars(struct part *part, int y, struct html_context *html_contex
|
||||
int x = par_format.orig_leftmargin;
|
||||
struct screen_char *const schar = get_format_screen_char(html_context, 0);
|
||||
|
||||
if (y >= part->box.height) {
|
||||
if (LEN(y) + par_format.blockquote_level <= x) {
|
||||
return;
|
||||
}
|
||||
|
||||
schar->data = '>';
|
||||
for (i = 1; i < par_format.blockquote_level; i++) {
|
||||
copy_screen_chars(&POS(x, y), schar, 1);
|
||||
if (part->char_width) part->char_width[x++] = 1;
|
||||
if (part->char_width) part->char_width[x] = 1;
|
||||
x++;
|
||||
}
|
||||
schar->data = ' ';
|
||||
copy_screen_chars(&POS(x, y), schar, 1);
|
||||
if (part->char_width) part->char_width[x++] = 1;
|
||||
if (part->char_width) part->char_width[x] = 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
16
test/blockquote_crash.html
Normal file
16
test/blockquote_crash.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<blockquote>
|
||||
<table>
|
||||
<tr valign=top><td><code>MonoImageDownsampleThreshold</code><td><td><td><td>1.5<td><td>=<td><td>=<td><td>=<td><td>=
|
||||
<tr valign=top><td><code>MonoImageDownsampleType</code><td><td><td><td>/Subsample<td><td>/Subsample<td><td>/Subsample<td><td>/Subsample<td><td>/Subsample
|
||||
<tr valign=top><td><code>MonoImageFilter</code><td><td><td><td>/CCITTFaxEncode<td><td>=<td><td>=<td><td>=<td><td>=
|
||||
<tr valign=top><td><code>Optimize</code><td><td><a href="#note_0">(0</a>,<a href="#note_5">5)</a><td><td>false<td><td>true<td><td>true<td><td>true<td><td>true
|
||||
</table></blockquote>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user