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

[blockquote] Prefix also caption. Added draw_blockquote_chars. Refs #103

This commit is contained in:
Witold Filipczyk 2021-03-15 20:06:12 +01:00
parent bb01193671
commit 602290b73b
3 changed files with 28 additions and 0 deletions

View File

@ -342,6 +342,25 @@ draw_frame_hchars(struct part *part, int x, int y, int width,
}
}
void
draw_blockquote_chars(struct part *part, int y, struct html_context *html_context)
{
if (par_format.blockquote_level) {
int i;
int x = par_format.orig_leftmargin;
struct screen_char *const schar = get_format_screen_char(html_context, 0);
schar->data = '>';
for (i = 1; i < par_format.blockquote_level; i++) {
copy_screen_chars(&POS(x, y), schar, 1);
part->char_width[x++] = 1;
}
schar->data = ' ';
copy_screen_chars(&POS(x, y), schar, 1);
part->char_width[x++] = 1;
}
}
void
draw_frame_vchars(struct part *part, int x, int y, int height,
unsigned char data, color_T bgcolor, color_T fgcolor,

View File

@ -66,6 +66,7 @@ void expand_lines(struct html_context *html_context, struct part *part,
int x, int y, int lines, color_T bgcolor);
void check_html_form_hierarchy(struct part *part);
void draw_blockquote_chars(struct part *part, int y, struct html_context *html_context);
void draw_frame_hchars(struct part *, int, int, int, unsigned char data, color_T bgcolor, color_T fgcolor, struct html_context *html_context);
void draw_frame_vchars(struct part *, int, int, int, unsigned char data, color_T bgcolor, color_T fgcolor, struct html_context *html_context);

View File

@ -1226,6 +1226,14 @@ draw_table_caption(struct html_context *html_context, struct table *table,
if (!part) return;
if (par_format.blockquote_level) {
int yy;
for (yy = 0; yy < part->box.height; yy++) {
draw_blockquote_chars(table->part, y + yy, html_context);
}
}
table->part->cy += part->box.height;
table->part->cx = -1;
table->part->link_num = part->link_num;