diff --git a/src/fun.c b/src/fun.c index d329f5e..964da66 100644 --- a/src/fun.c +++ b/src/fun.c @@ -85,7 +85,8 @@ static int starts_with_kw(const char *s, const char *kw) { } /* Compute how many indentation levels (2 spaces per level) are still open. - * Only counts significant lines (non-blank, not comment-only), and ignores text inside /* ... *\/ block comments. */ + * Only counts significant lines (non-blank, not comment-only), + * and ignores text inside \/* ... *\/ block comments. */ static int compute_open_indent_blocks(const char *buf) { int in_block_comment = 0; int open = 0; @@ -131,7 +132,7 @@ static int compute_open_indent_blocks(const char *buf) { /* // comment-only line */ continue; } else if (t[1] == '*') { - /* /* start of block comment */ + /* start of block comment */ in_block_comment = 1; continue; } @@ -157,8 +158,8 @@ static int compute_open_indent_blocks(const char *buf) { } /* Detect if current buffer looks incomplete: - * - Unclosed quotes (' or ") with escapes - * - Unclosed block comment /* ... *\/ + * - Unclosed quotes (\' or \") with escapes + * - Unclosed block comment \/* ... *\/ * - Parentheses not balanced * - Last significant line is a block header (if/else/while/for/fun) * - Line ends with an operator/comma