Skip to content

Commit

Permalink
Escape linebreaks in html diff view
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Sievert authored and rubengees committed Sep 11, 2023
1 parent 278245c commit 72ce3d7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class HtmlReportWriter(private val logger: Logger) {
return bodyDiff
.map { it.replace(Regex("(?<!\\\\)'"), Regex.escapeReplacement("\\'")) }
.map { it.replace(Regex("(?<!\\\\)\""), Regex.escapeReplacement("\\\"")) }
.map { it.replace(Regex("\\\\n"), Regex.escapeReplacement("\\\\n")) }
.joinToString(HTML_LINE_ENDING)
}

Expand Down

0 comments on commit 72ce3d7

Please sign in to comment.