diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-10-28 22:21:45 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-10-28 22:21:45 -0700 |
commit | adc78c85809fb2f79f967d29713e2d9f520aea5b (patch) | |
tree | 78cf9557f56b748f89c5cfdf9f4468080f94da63 | |
parent | eb8087e9714eaeb8b1427e7fd9cd2a703487b383 (diff) |
Rename number_of_emphasis_openers -> emphasis_nestlevel.
-rw-r--r-- | src/inlines.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/inlines.c b/src/inlines.c index 928a3ac..d282170 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -23,7 +23,7 @@ typedef struct Subject { int label_nestlevel; reference_map *refmap; inline_stack *emphasis_openers; - int number_of_emphasis_openers; + int emphasis_nestlevel; } subject; static node_inl *parse_chunk_inlines(chunk *chunk, reference_map *refmap); @@ -178,7 +178,7 @@ static void subject_from_buf(subject *e, strbuf *buffer, reference_map *refmap) e->label_nestlevel = 0; e->refmap = refmap; e->emphasis_openers = NULL; - e->number_of_emphasis_openers = 0; + e->emphasis_nestlevel = 0; chunk_rtrim(&e->input); } @@ -192,7 +192,7 @@ static void subject_from_chunk(subject *e, chunk *chunk, reference_map *refmap) e->label_nestlevel = 0; e->refmap = refmap; e->emphasis_openers = NULL; - e->number_of_emphasis_openers = 0; + e->emphasis_nestlevel = 0; chunk_rtrim(&e->input); } @@ -312,7 +312,7 @@ static void free_openers(subject* subj, inline_stack* istack) while (subj->emphasis_openers != istack) { tempstack = subj->emphasis_openers; subj->emphasis_openers = subj->emphasis_openers->previous; - subj->number_of_emphasis_openers--; + subj->emphasis_nestlevel--; free(tempstack); } } @@ -393,7 +393,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->number_of_emphasis_openers < EMPHASIS_STACK_LIMIT) + if (can_open && subj->emphasis_nestlevel < EMPHASIS_STACK_LIMIT) { istack = (inline_stack*)malloc(sizeof(inline_stack)); if (istack == NULL) { @@ -404,7 +404,7 @@ cannotClose: istack->first_inline = inl_text; istack->previous = subj->emphasis_openers; subj->emphasis_openers = istack; - subj->number_of_emphasis_openers++; + subj->emphasis_nestlevel++; } return inl_text; |