summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-17 12:52:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-17 12:52:57 -0700
commitfbb5d9ad8d288a1d3b1abfde7c8660facb3b9b04 (patch)
treed61abb8366c9763ad31fc5fb749c43b32322c66e
parentd602943b9c4cc94d5809224ec8ecf45cdc8f559e (diff)
Do cheaper test first.
-rw-r--r--src/blocks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 95d3cff..53bdb19 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -322,7 +322,8 @@ static cmark_node *finalize(cmark_parser *parser, cmark_node *b) {
// spaces between them:
subitem = item->first_child;
while (subitem) {
- if (S_ends_with_blank_line(subitem) && (item->next || subitem->next)) {
+ if ((item->next || subitem->next) &&
+ S_ends_with_blank_line(subitem)) {
b->as.list.tight = false;
break;
}