Skip to content

Commit

Permalink
Drop last additional newline character added when rewriting parsed HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdgr8 committed Dec 22, 2024
1 parent fc574c8 commit 920f22d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public class DirectiveBasedHtmlTemplateProcessingStrategy(private val context: D
handleCommandAsComment(command, bodyTrimed, input, output)
}

Files.write(output.toPath(), listOf(document.outerHtml()))
// drop last additional \n character that's added
Files.write(output.toPath(), listOf(document.outerHtml().dropLast(1)))
true
} else false

Expand Down

0 comments on commit 920f22d

Please sign in to comment.