}
t++;
}
- if (xpos + wordsize != xright)
+ if (xpos < xright)
output_byte(' ');
wordptr = wordbuf;
wordsize = 0;
/* Any line that is all dashes implies the line above is a title */
pos = indent;
while((p = get_text()) != NULL) {
- /* Do centre/right align here via ttype */
- /* Also check for table head/body divider */
if (row != theader + 1) {
if (row == theader)
force_bold(1);
+ if (ttype[t] & CENTRE) {
+ move_column(pos + (twidth[t] - width(p))/2);
+ } else if (ttype[t] & RIGHT) {
+ move_column(pos + twidth[t] - width(p));
+ }
normal_syntax(p);
force_bold(0);
wordflush();
f |= CENTRE;
p++;
}
- while(*p++ == '-')
+ while(*p == '-') {
+ p++;
n++;
+ }
if (*p == ':') {
f |= RIGHT;
p++;
*e = 0;
if (theader == 255) {
ht = header_type(p);
- if (ht == -1)
+ if (ht == -1) {
hdr = 0;
+ ht = 0;
+ }
ttype[t] = ht;
}
add_text(strdup_err(p));
if (!in_nlist) {
in_nlist = 1;
}
+ newline();
normal_syntax(p + 1);
newline();
listindent = nlist_indent[mode];
/* List continuation */
if (in_ulist || in_olist || in_nlist) {
indent += listindent;
- newline();
normal_syntax(p + 2);
indent -= listindent;
return;
case '|':
process_table(p);
return;
- case '\\':
+ case ':':
named_list(p);
return;
default: