Fix indentation bugs

master
Drew DeVault 7 years ago
parent fe7d68bef9
commit 14ef2b3839
  1. 4
      README.md
  2. 5
      src/main.c

@ -12,6 +12,10 @@ You can pass PREFIX or DESTDIR to make if you'd like:
make PREFIX=/usr make PREFIX=/usr
sudo make PREFIX=/usr install sudo make PREFIX=/usr install
## Usage
See scdoc(1)
## Contributing ## Contributing
Send patches/bug reports to sir@cmpwn.com Send patches/bug reports to sir@cmpwn.com

@ -171,8 +171,8 @@ static int parse_indent(struct parser *p, int *indent, bool write) {
} else if (i != *indent && ch == '\t') { } else if (i != *indent && ch == '\t') {
parser_fatal(p, "Indented by an amount greater than 1"); parser_fatal(p, "Indented by an amount greater than 1");
} }
*indent = i;
} }
*indent = i;
return i; return i;
} }
@ -220,9 +220,10 @@ static void parse_list(struct parser *p, int *indent) {
default: default:
fprintf(p->output, "\n"); fprintf(p->output, "\n");
parser_pushch(p, ch); parser_pushch(p, ch);
return; goto ret;
} }
} while (ch != UTF8_INVALID); } while (ch != UTF8_INVALID);
ret:
if (!closed) { if (!closed) {
roff_macro(p, "RE", NULL); roff_macro(p, "RE", NULL);
} }

Loading…
Cancel
Save