summaryrefslogtreecommitdiff
path: root/src/inlines.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-18 21:04:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-18 21:04:42 -0700
commita50384fac90f89165fd3120b2e5fec39ca4b8ff7 (patch)
treec1b533b69eebb319a1c739ef70853c1beab32ecf /src/inlines.c
parent93b1ac3408142fb08643de1d94a77384add2fd09 (diff)
Don't emit empty str elements in handle_strong_emph.
Diffstat (limited to 'src/inlines.c')
-rw-r--r--src/inlines.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/inlines.c b/src/inlines.c
index 1eb5056..9fa4a7f 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -360,7 +360,7 @@ static node_inl* handle_strong_emph(subject* subj, char c, node_inl **last)
return handle_strong_emph(subj, c, last);
}
- return make_str(chunk_literal(""));
+ return NULL; // make_str(chunk_literal(""));
}
cannotClose:
@@ -845,8 +845,10 @@ static int parse_inline(subject* subj, node_inl ** first, node_inl ** last)
append_inlines(*first, new);
}
- while (new->next) {
- new = new->next;
+ if (new) {
+ while (new->next) {
+ new = new->next;
+ }
}
*last = new;