diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/blocks.c | 6 | ||||
-rw-r--r-- | src/chunk.h | 8 | ||||
-rw-r--r-- | src/latex.c | 13 | ||||
-rw-r--r-- | src/scanners.h | 3 | ||||
-rw-r--r-- | src/xml.c | 6 |
5 files changed, 21 insertions, 15 deletions
diff --git a/src/blocks.c b/src/blocks.c index 75d005d..773179e 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -336,7 +336,8 @@ static void process_inlines(cmark_node *root, cmark_reference_map *refmap, while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) { cur = cmark_iter_get_node(iter); if (ev_type == CMARK_EVENT_ENTER) { - if (cur->type == CMARK_NODE_PARAGRAPH || cur->type == CMARK_NODE_HEADING) { + if (cur->type == CMARK_NODE_PARAGRAPH || + cur->type == CMARK_NODE_HEADING) { cmark_parse_inlines(cur, refmap, options); } } @@ -812,7 +813,8 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer, } else if (!indented && !(container->type == CMARK_NODE_PARAGRAPH && !all_matched) && - (matched = scan_thematic_break(&input, parser->first_nonspace))) { + (matched = + scan_thematic_break(&input, parser->first_nonspace))) { // it's only now that we know the line is not part of a setext heading: container = add_child(parser, container, CMARK_NODE_THEMATIC_BREAK, diff --git a/src/chunk.h b/src/chunk.h index b25831b..7007492 100644 --- a/src/chunk.h +++ b/src/chunk.h @@ -48,8 +48,8 @@ static CMARK_INLINE void cmark_chunk_trim(cmark_chunk *c) { cmark_chunk_rtrim(c); } -static CMARK_INLINE bufsize_t cmark_chunk_strchr(cmark_chunk *ch, int c, - bufsize_t offset) { +static CMARK_INLINE bufsize_t + cmark_chunk_strchr(cmark_chunk *ch, int c, bufsize_t offset) { const unsigned char *p = (unsigned char *)memchr(ch->data + offset, c, ch->len - offset); return p ? (bufsize_t)(p - ch->data) : ch->len; @@ -96,8 +96,8 @@ static CMARK_INLINE cmark_chunk cmark_chunk_literal(const char *data) { return c; } -static CMARK_INLINE cmark_chunk cmark_chunk_dup(const cmark_chunk *ch, - bufsize_t pos, bufsize_t len) { +static CMARK_INLINE cmark_chunk + cmark_chunk_dup(const cmark_chunk *ch, bufsize_t pos, bufsize_t len) { cmark_chunk c = {ch->data + pos, len, 0}; return c; } diff --git a/src/latex.c b/src/latex.c index c961a08..57d474c 100644 --- a/src/latex.c +++ b/src/latex.c @@ -142,12 +142,13 @@ static inline void outc(cmark_renderer *renderer, cmark_escaping escape, } } -typedef enum { NO_LINK, - URL_AUTOLINK, - EMAIL_AUTOLINK, - NORMAL_LINK, - INTERNAL_LINK - } link_type; +typedef enum { + NO_LINK, + URL_AUTOLINK, + EMAIL_AUTOLINK, + NORMAL_LINK, + INTERNAL_LINK +} link_type; static link_type get_link_type(cmark_node *node) { size_t title_len, url_len; diff --git a/src/scanners.h b/src/scanners.h index c2c03eb..5e3cbe7 100644 --- a/src/scanners.h +++ b/src/scanners.h @@ -44,7 +44,8 @@ bufsize_t _scan_dangerous_url(const unsigned char *p); #define scan_link_title(c, n) _scan_at(&_scan_link_title, c, n) #define scan_spacechars(c, n) _scan_at(&_scan_spacechars, c, n) #define scan_atx_heading_start(c, n) _scan_at(&_scan_atx_heading_start, c, n) -#define scan_setext_heading_line(c, n) _scan_at(&_scan_setext_heading_line, c, n) +#define scan_setext_heading_line(c, n) \ + _scan_at(&_scan_setext_heading_line, c, n) #define scan_thematic_break(c, n) _scan_at(&_scan_thematic_break, c, n) #define scan_open_code_fence(c, n) _scan_at(&_scan_open_code_fence, c, n) #define scan_close_code_fence(c, n) _scan_at(&_scan_close_code_fence, c, n) @@ -105,10 +105,12 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type, case CMARK_NODE_CUSTOM_BLOCK: case CMARK_NODE_CUSTOM_INLINE: cmark_strbuf_puts(xml, " on_enter=\""); - escape_xml(xml, node->as.custom.on_enter.data, node->as.custom.on_enter.len); + escape_xml(xml, node->as.custom.on_enter.data, + node->as.custom.on_enter.len); cmark_strbuf_putc(xml, '"'); cmark_strbuf_puts(xml, " on_exit=\""); - escape_xml(xml, node->as.custom.on_exit.data, node->as.custom.on_exit.len); + escape_xml(xml, node->as.custom.on_exit.data, + node->as.custom.on_exit.len); cmark_strbuf_putc(xml, '"'); break; case CMARK_NODE_LINK: |