Skip to content

Commit 8ea3072

Browse files
MayankQuietMisdreavus
authored andcommitted
Removed the if condition to make code more concise.
- Instead of checking for `if` condition to populate the `isQuoted` var, we can directly use the boolean result of `!=` relational operator to populate the variable. - This makes the code concise and more easier to debug and dry-run the while loop.
1 parent e24d66a commit 8ea3072

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/Markdown/Parser/BlockDirectiveParser.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,7 @@ struct TrimmedLine {
414414
isEscaped = true
415415
}
416416
else if isQuoted {
417-
if c == "\"" {
418-
isQuoted = false
419-
}
417+
isQuoted = (c != "\"")
420418
}
421419
else if allowQuote,
422420
c == "\"" {

0 commit comments

Comments
 (0)