mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[blockquote] More draw_blockquote_chars. Refs #103
This commit is contained in:
parent
602290b73b
commit
089189638b
@ -327,38 +327,25 @@ draw_frame_hchars(struct part *part, int x, int y, int width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (par_format.blockquote_level) {
|
if (par_format.blockquote_level) {
|
||||||
int i;
|
draw_blockquote_chars(part, y, html_context);
|
||||||
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
|
void
|
||||||
draw_blockquote_chars(struct part *part, int y, struct html_context *html_context)
|
draw_blockquote_chars(struct part *part, int y, struct html_context *html_context)
|
||||||
{
|
{
|
||||||
if (par_format.blockquote_level) {
|
int i;
|
||||||
int i;
|
int x = par_format.orig_leftmargin;
|
||||||
int x = par_format.orig_leftmargin;
|
struct screen_char *const schar = get_format_screen_char(html_context, 0);
|
||||||
struct screen_char *const schar = get_format_screen_char(html_context, 0);
|
|
||||||
|
|
||||||
schar->data = '>';
|
schar->data = '>';
|
||||||
for (i = 1; i < par_format.blockquote_level; i++) {
|
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);
|
copy_screen_chars(&POS(x, y), schar, 1);
|
||||||
part->char_width[x++] = 1;
|
part->char_width[x++] = 1;
|
||||||
}
|
}
|
||||||
|
schar->data = ' ';
|
||||||
|
copy_screen_chars(&POS(x, y), schar, 1);
|
||||||
|
part->char_width[x++] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -399,18 +386,7 @@ expand_lines(struct html_context *html_context, struct part *part,
|
|||||||
realloc_line(html_context, part->document, Y(y + line), X(x));
|
realloc_line(html_context, part->document, Y(y + line), X(x));
|
||||||
|
|
||||||
if (par_format.blockquote_level) {
|
if (par_format.blockquote_level) {
|
||||||
int i;
|
draw_blockquote_chars(part, y + line, html_context);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -584,17 +560,7 @@ set_hline(struct html_context *html_context, char *chars, int charslen,
|
|||||||
|
|
||||||
if (part->begin) {
|
if (part->begin) {
|
||||||
if (par_format.blockquote_level && !html_context->table_level) {
|
if (par_format.blockquote_level && !html_context->table_level) {
|
||||||
int i;
|
draw_blockquote_chars(part, y, html_context);
|
||||||
x = par_format.orig_leftmargin;
|
|
||||||
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;
|
|
||||||
x = part->cx;
|
|
||||||
}
|
}
|
||||||
part->begin = 0;
|
part->begin = 0;
|
||||||
}
|
}
|
||||||
@ -835,17 +801,7 @@ set_hline(struct html_context *html_context, char *chars, int charslen,
|
|||||||
|
|
||||||
if (part->begin) {
|
if (part->begin) {
|
||||||
if (par_format.blockquote_level && !html_context->table_level) {
|
if (par_format.blockquote_level && !html_context->table_level) {
|
||||||
int i;
|
draw_blockquote_chars(part, y, html_context);
|
||||||
x = par_format.orig_leftmargin;
|
|
||||||
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;
|
|
||||||
x = part->cx;
|
|
||||||
}
|
}
|
||||||
part->begin = 0;
|
part->begin = 0;
|
||||||
}
|
}
|
||||||
@ -1033,17 +989,7 @@ move_chars(struct html_context *html_context, int x, int y, int nx, int ny)
|
|||||||
move_links(html_context, x, y, nx, ny);
|
move_links(html_context, x, y, nx, ny);
|
||||||
|
|
||||||
if (par_format.blockquote_level && !html_context->table_level) {
|
if (par_format.blockquote_level && !html_context->table_level) {
|
||||||
struct screen_char *const schar = get_format_screen_char(html_context, 0);
|
draw_blockquote_chars(part, ny, html_context);
|
||||||
int i;
|
|
||||||
int x = par_format.orig_leftmargin;
|
|
||||||
schar->data = '>';
|
|
||||||
for (i = 1; i < par_format.blockquote_level; i++) {
|
|
||||||
copy_screen_chars(&POS(x, ny), schar, 1);
|
|
||||||
part->char_width[x++] = 1;
|
|
||||||
}
|
|
||||||
schar->data = ' ';
|
|
||||||
copy_screen_chars(&POS(x, ny), schar, 1);
|
|
||||||
part->char_width[x++] = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>valA</td><td>valB</td><td>valC</td><td>valD</td></tr>
|
<tr><td>valA</td><td>valB</td><td>valC</td><td>valD</td></tr>
|
||||||
<tr><td>valA</td><td>valB</td><td>valC</td><td>valD</td></tr>
|
<tr><td>valA<br>AA</td><td>valB</td><td>valC</td><td>valD</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
Loading…
Reference in New Issue
Block a user