def newline.preserve
import bend-lint-rules@0.2.0.0/layout/format.bend as Formatimport Base
2406def newline.preserve(preserve: Bool, source: String) -> String:
2407 match preserve:
2408 case True{}:
2409 first_newline(source)
2410 case False{}:
2411 "\n"