summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-06-10 23:57:52 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-06-10 23:57:52 -0700
commit1bdb53d28f75db491e4706932fe0efd023f14d9f (patch)
tree3a9b2c664b53385ff97768d4fae37ed09447ba94
parentaa2f771502ad48842bf084ccd67aaa19cac590c0 (diff)
More code simplification.
-rw-r--r--src/inlines.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inlines.c b/src/inlines.c
index c04e793..7b51be9 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -465,7 +465,7 @@ static void process_emphasis(subject *subj, delimiter *start_delim)
}
old_closer = closer;
if (closer->delim_char == '*' || closer->delim_char == '_') {
- if (opener != NULL && opener != start_delim) {
+ if (opener_found) {
closer = S_insert_emph(subj, opener, closer);
} else {
closer = closer->next;
@@ -474,7 +474,7 @@ static void process_emphasis(subject *subj, delimiter *start_delim)
cmark_chunk_free(&closer->inl_text->as.literal);
closer->inl_text->as.literal =
cmark_chunk_literal(RIGHTSINGLEQUOTE);
- if (opener != NULL && opener != start_delim) {
+ if (opener_found) {
cmark_chunk_free(&opener->inl_text->as.literal);
opener->inl_text->as.literal =
cmark_chunk_literal(LEFTSINGLEQUOTE);
@@ -484,7 +484,7 @@ static void process_emphasis(subject *subj, delimiter *start_delim)
cmark_chunk_free(&closer->inl_text->as.literal);
closer->inl_text->as.literal =
cmark_chunk_literal(RIGHTDOUBLEQUOTE);
- if (opener != NULL && opener != start_delim) {
+ if (opener_found) {
cmark_chunk_free(&opener->inl_text->as.literal);
opener->inl_text->as.literal =
cmark_chunk_literal(LEFTDOUBLEQUOTE);