summaryrefslogtreecommitdiff
path: root/src/inlines.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-05 09:53:35 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-05 09:53:35 -0800
commit715d1a5921a4e3e10220d466c4ee2c1261d28c1e (patch)
tree25cdfae7c4d3139a448f259b0ba3e52d27f2e1c6 /src/inlines.c
parent90c48e849440e50b3fef21f0cd6c38b998490073 (diff)
Removed stack limits in inline parsing.
This brings back segfaults, but we're now aiming for a better solution, revising the renderer so it doesn't use recursion, and using a stack approach for nested brackets. Removing these limits will allow us to know when we've got it right. See #166, #187.
Diffstat (limited to 'src/inlines.c')
-rw-r--r--src/inlines.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/inlines.c b/src/inlines.c
index 1ab1b29..a43012f 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -416,7 +416,7 @@ static node_inl* handle_strong_emph(subject* subj, unsigned char c, node_inl **l
cannotClose:
inl_text = make_str(chunk_dup(&subj->input, subj->pos - numdelims, numdelims));
- if (can_open && subj->emphasis_nestlevel < STACK_LIMIT)
+ if (can_open)
{
istack = (inline_stack*)malloc(sizeof(inline_stack));
if (istack == NULL) {
@@ -617,8 +617,7 @@ static int link_label(subject* subj, chunk *raw_label)
advance(subj); // advance past [
unsigned char c;
- while ((c = peek_char(subj)) &&
- (c != ']' || (nestlevel > 0 && nestlevel < STACK_LIMIT))) {
+ while ((c = peek_char(subj)) && (c != ']' || nestlevel > 0)) {
switch (c) {
case '`':
tmp = handle_backticks(subj);