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

[blockquoute] > starts with the same column. Refs #103

This commit is contained in:
Witold Filipczyk 2021-03-09 18:17:39 +01:00
parent c72569d723
commit 14c4584cde
3 changed files with 6 additions and 2 deletions

View File

@ -102,6 +102,7 @@ struct par_attrib {
int width;
int list_level;
int blockquote_level;
int orig_leftmargin;
unsigned list_number;
int dd_margin;
enum format_list_flag flags;

View File

@ -531,6 +531,7 @@ html_blockquote(struct html_context *html_context, char *a,
{
par_format.align = ALIGN_LEFT;
if (par_format.blockquote_level == 0) {
par_format.orig_leftmargin = par_format.leftmargin;
par_format.blockquote_level++;
}
par_format.blockquote_level++;

View File

@ -535,7 +535,7 @@ set_hline(struct html_context *html_context, char *chars, int charslen,
if (part->begin) {
if (par_format.blockquote_level) {
int i;
x = part->cx - par_format.blockquote_level;
x = par_format.orig_leftmargin;
schar->data = '>';
for (i = 1; i < par_format.blockquote_level; i++) {
copy_screen_chars(&POS(x, y), schar, 1);
@ -544,6 +544,7 @@ set_hline(struct html_context *html_context, char *chars, int charslen,
schar->data = ' ';
copy_screen_chars(&POS(x, y), schar, 1);
part->char_width[x++] = 1;
x = part->cx;
}
part->begin = 0;
}
@ -785,7 +786,7 @@ set_hline(struct html_context *html_context, char *chars, int charslen,
if (part->begin) {
if (par_format.blockquote_level) {
int i;
x = part->cx - par_format.blockquote_level;
x = par_format.orig_leftmargin;
schar->data = '>';
for (i = 1; i < par_format.blockquote_level; i++) {
copy_screen_chars(&POS(x, y), schar, 1);
@ -794,6 +795,7 @@ set_hline(struct html_context *html_context, char *chars, int charslen,
schar->data = ' ';
copy_screen_chars(&POS(x, y), schar, 1);
part->char_width[x++] = 1;
x = part->cx;
}
part->begin = 0;
}