Add TrimLineBreaks and TrimWhitespace lambdas to default codegen (#21759)

This commit is contained in:
Pim Merks 2025-08-16 05:36:35 +02:00 committed by GitHub
parent d7aee8a0d6
commit 9cd04e71fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -436,8 +436,11 @@ public class DefaultCodegen implements CodegenConfig {
.put("indented", new IndentedLambda())
.put("indented_8", new IndentedLambda(8, " ", false, false))
.put("indented_12", new IndentedLambda(12, " ", false, false))
.put("indented_16", new IndentedLambda(16, " ", false, false));
.put("indented_16", new IndentedLambda(16, " ", false, false))
.put("trimLineBreaks", new TrimLineBreaksLambda())
.put("trimWhitespace", new TrimWhitespaceLambda())
.put("trimTrailingWithNewLine", new TrimTrailingWhiteSpaceLambda(true))
.put("trimTrailing", new TrimTrailingWhiteSpaceLambda(false));
}
private void registerMustacheLambdas() {

View File

@ -439,9 +439,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen {
.put("joinWithAmpersand", new JoinWithCommaLambda(true, " ", " && "))
.put("joinLinesWithComma", new JoinWithCommaLambda(false, "\n", ",\n"))
.put("joinConditions", new JoinWithCommaLambda(true, " ", " && "))
.put("trimLineBreaks", new TrimLineBreaksLambda())
.put("trimTrailingWithNewLine", new TrimTrailingWhiteSpaceLambda(true))
.put("trimTrailing", new TrimTrailingWhiteSpaceLambda(false))
.put("first", new FirstLambda(" "))
.put("firstDot", new FirstLambda("\\."))
.put("indent1", new IndentedLambda(4, " ", false, true))