def chomped
import yaml-for-bend@0.1.1.0/scan.bend as Scanimport Base
1080# The final line break and the blank lines after the text.
1081def chomped(chomp: Chomp, +acc: String, +lead: Bool, +brks: Nat) -> String:
1082 match chomp:
1083 case Clip{}:
1084 Bool.pick(String, lead, SCon{'\n', acc}, acc)
1085 case Strip{}:
1086 acc
1087 case Keep{}:
1088 String.repeat("\n", brks) ++ Bool.pick(String, lead, SCon{'\n', acc}, acc)