Skip to content

Commit

Permalink
Rewrite takeBeforeComment and trimComment functions
Browse files Browse the repository at this point in the history
  • Loading branch information
BOOMeranGG committed Dec 8, 2022
1 parent b1d7acb commit 7967559
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private fun String.getCommentStartIndex(): Int {

chars.forEachIndexed { idx, symbol ->
// take hash index if it's not enclosed in quotation marks
if (currentQuoteChar == null && symbol == '#') {
if (symbol == '#' && currentQuoteChar == null) {
return idx
}

Expand Down

0 comments on commit 7967559

Please sign in to comment.