Fixed small bug in dolist

This commit is contained in:
gottox@rootkit.lan 2007-12-12 01:02:44 +01:00
parent 97edae2065
commit 1f01809f7c

View file

@ -237,11 +237,11 @@ dolist(const char *begin, const char *end) {
if(p[1] == '\n') { if(p[1] == '\n') {
run = 0; run = 0;
buffer[i++] = '\n'; buffer[i++] = '\n';
buffer[i++] = '\n';
p++; p++;
} }
if(p[1] == ' ') { if(p[1] == ' ') {
run = 1; run = 1;
buffer[i++] = '\n';
p += indent + 1; p += indent + 1;
} }
else if(p[1] >= '0' && p[1] <= '9' || strchr("+-*",p[1])) { else if(p[1] >= '0' && p[1] <= '9' || strchr("+-*",p[1])) {
@ -257,7 +257,7 @@ dolist(const char *begin, const char *end) {
buffer[i] = '\0'; buffer[i] = '\0';
while(buffer[--i] == '\n') buffer[i] = '\0'; while(buffer[--i] == '\n') buffer[i] = '\0';
fputs("<li>",stdout); fputs("<li>",stdout);
process(buffer,i+2+buffer); hprint(buffer,i+2+buffer);
fputs("</li>\n",stdout); fputs("</li>\n",stdout);
} }
puts(ul ? "</ul>" : "</ol>"); puts(ul ? "</ul>" : "</ol>");