diff options
author | Ben Trask <bentrask@comcast.net> | 2015-04-07 05:32:01 -0400 |
---|---|---|
committer | Ben Trask <bentrask@comcast.net> | 2015-04-07 09:27:00 -0400 |
commit | 271d8a16e0fa62aa8d6eace9b1931cc4beb27e06 (patch) | |
tree | edcd0a81e83561bd95b71e281585aba0f8fc84cd /src/blocks.c | |
parent | b8aa64967e328d2d9fa0bc1f21c0970ec32d259f (diff) |
Try to match existing style better.
Diffstat (limited to 'src/blocks.c')
-rw-r--r-- | src/blocks.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/blocks.c b/src/blocks.c index 06521d1..4acd899 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -213,10 +213,10 @@ finalize(cmark_parser *parser, cmark_node* b) (b->type == NODE_HEADER && b->as.header.setext)) { b->end_line = parser->line_number; b->end_column = parser->curline->size; - if (b->end_column && parser->curline->ptr[b->end_column-1] == '\n') - b->end_column -= 1; - if (b->end_column && parser->curline->ptr[b->end_column-1] == '\r') - b->end_column -= 1; + if (b->end_column && parser->curline->ptr[b->end_column - 1] == '\n') + b->end_column--; + if (b->end_column && parser->curline->ptr[b->end_column - 1] == '\r') + b->end_column--; } else { b->end_line = parser->line_number - 1; b->end_column = parser->last_line_length; @@ -895,11 +895,11 @@ S_process_line(cmark_parser *parser, const unsigned char *buffer, size_t bytes) finished: parser->last_line_length = parser->curline->size; if (parser->last_line_length && - parser->curline->ptr[parser->last_line_length-1] == '\n') - parser->last_line_length -= 1; + parser->curline->ptr[parser->last_line_length - 1] == '\n') + parser->last_line_length--; if (parser->last_line_length && - parser->curline->ptr[parser->last_line_length-1] == '\r') - parser->last_line_length -= 1; + parser->curline->ptr[parser->last_line_length - 1] == '\r') + parser->last_line_length--; cmark_strbuf_clear(parser->curline); |