diff --git a/Unix/cloc b/Unix/cloc index 2650b583..74b7d344 100755 --- a/Unix/cloc +++ b/Unix/cloc @@ -12022,7 +12022,9 @@ sub call_parse_civet { # {{{1 } my (@step_1, @step_2, @step_3, @step_4); if ($coffeeComment) { - @step_4 = remove_matches($ra_lines, '^\s*#'); + @step_1 = call_regexp_common($ra_lines, 'C'); + @step_2 = remove_between_general(\@step_1, '###', '###'); + @step_4 = remove_matches( \@step_2, '^\s*#'); } else { @step_1 = call_regexp_common($ra_lines, 'C'); @step_2 = remove_matches( \@step_1, '^///'); diff --git a/cloc b/cloc index f3b09421..776d3320 100755 --- a/cloc +++ b/cloc @@ -12012,7 +12012,9 @@ sub call_parse_civet { # {{{1 } my (@step_1, @step_2, @step_3, @step_4); if ($coffeeComment) { - @step_4 = remove_matches($ra_lines, '^\s*#'); + @step_1 = call_regexp_common($ra_lines, 'C'); + @step_2 = remove_between_general(\@step_1, '###', '###'); + @step_4 = remove_matches( \@step_2, '^\s*#'); } else { @step_1 = call_regexp_common($ra_lines, 'C'); @step_2 = remove_matches( \@step_1, '^///'); diff --git a/tests/outputs/parser_2.civet.yaml b/tests/outputs/parser_2.civet.yaml index 968536de..31387843 100644 --- a/tests/outputs/parser_2.civet.yaml +++ b/tests/outputs/parser_2.civet.yaml @@ -3,19 +3,19 @@ header : cloc_url : github.com/AlDanial/cloc cloc_version : 2.03 - elapsed_seconds : 0.00371313095092773 + elapsed_seconds : 0.00477790832519531 n_files : 1 n_lines : 37 - files_per_second : 269.31449852318 - lines_per_second : 9964.63644535765 + files_per_second : 209.296606786427 + lines_per_second : 7743.9744510978 report_file : tests/outputs/parser_2.civet.yaml 'Civet' : nFiles: 1 blank: 4 - comment: 9 - code: 24 + comment: 14 + code: 19 SUM: blank: 4 - comment: 9 - code: 24 + comment: 14 + code: 19 nFiles: 1