summaryrefslogtreecommitdiff
path: root/src/commonmark.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-06-24 21:55:44 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-24 21:55:44 -0700
commit2b1b00fb19fe470f7745c208377345975b9e0b2c (patch)
treee06c460e05653b3e9c505fc129e004b3cad9f584 /src/commonmark.c
parentce5671ae0289b05322c09bb80af2d3317acd544f (diff)
Reformatted.
Diffstat (limited to 'src/commonmark.c')
-rw-r--r--src/commonmark.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index f1589f5..b8b1820 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -29,8 +29,7 @@ static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,
char encoded[ENCODED_SIZE];
needs_escaping =
- c < 0x80 &&
- escape != LITERAL &&
+ c < 0x80 && escape != LITERAL &&
((escape == NORMAL &&
(c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' ||
c == '>' || c == '\\' || c == '`' || c == '!' ||
@@ -41,9 +40,9 @@ static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,
!follows_digit) ||
(renderer->begin_content && (c == '.' || c == ')') && follows_digit &&
(nextc == 0 || cmark_isspace(nextc))))) ||
- (escape == URL && (c == '`' || c == '<' || c == '>' ||
- cmark_isspace(c) || c == '\\' || c == ')' ||
- c == '(')) ||
+ (escape == URL &&
+ (c == '`' || c == '<' || c == '>' || cmark_isspace(c) || c == '\\' ||
+ c == ')' || c == '(')) ||
(escape == TITLE &&
(c == '`' || c == '<' || c == '>' || c == '"' || c == '\\')));
@@ -268,7 +267,7 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
case CMARK_NODE_CODE_BLOCK:
first_in_list_item = node->prev == NULL && node->parent &&
- node->parent->type == CMARK_NODE_ITEM;
+ node->parent->type == CMARK_NODE_ITEM;
if (!first_in_list_item) {
BLANKLINE();
@@ -348,10 +347,9 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
if (CMARK_OPT_HARDBREAKS & options) {
LIT(" ");
CR();
- } else if (!renderer->no_linebreaks &&
- renderer->width == 0 &&
- !(CMARK_OPT_HARDBREAKS & options) &&
- !(CMARK_OPT_NOBREAKS & options)) {
+ } else if (!renderer->no_linebreaks && renderer->width == 0 &&
+ !(CMARK_OPT_HARDBREAKS & options) &&
+ !(CMARK_OPT_NOBREAKS & options)) {
CR();
} else {
OUT(" ", allow_wrap, LITERAL);