Skip to content

Commit

Permalink
Add alternative syntax for ordered lists
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulPrudya authored and karlb committed Dec 8, 2024
1 parent 5584bc6 commit b031248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ dolist(const char *begin, const char *end, int newblock) {
} else {
num_start = p;
for (; p < end && *p >= '0' && *p <= '9'; p++);
if (p >= end || *p != '.')
if (p >= end || ((*p != '.') && (*p != ')')))
return 0;
start_number = atoi(num_start);
}
Expand Down Expand Up @@ -455,7 +455,7 @@ dolist(const char *begin, const char *end, int newblock) {
for (; q + j != end && q[j] >= '0' && q[j] <= '9' && j < indent; j++);
if (q + j == end)
break;
if (j > 0 && q[j] == '.')
if (j > 0 && ((q[j] == '.') || (q[j] == ')')))
j++;
else
j = 0;
Expand Down

0 comments on commit b031248

Please sign in to comment.