From 271d8a16e0fa62aa8d6eace9b1931cc4beb27e06 Mon Sep 17 00:00:00 2001 From: Ben Trask Date: Tue, 7 Apr 2015 05:32:01 -0400 Subject: Try to match existing style better. --- src/blocks.c | 16 ++++++++-------- 1 file 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); -- cgit v1.2.3