Skip to content

Commit

Permalink
Remove block comment stripping from source parsing
Browse files Browse the repository at this point in the history
Previously, the code removed both line and block comments. This change limits comment removal to line comments only to align with the intended parsing behavior as the previous check could have erroneously removed lines with path definitions.
  • Loading branch information
thelooter committed Dec 20, 2024
1 parent 50af00d commit 01862bf
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ abstract class Source<C : Config>(val project: Project, private val serializer:
.split("\n").joinToString("\n") { line ->
// Remove // comments
line.substringBefore("//").trim()
// Remove /* */ comments
line.replace(Regex("/\\*.*?\\*/"), "").trim()
}
// Remove trailing commas
.replace(Regex(",\\s*}"), "\n}")
Expand Down

0 comments on commit 01862bf

Please sign in to comment.