def Yaml.block.line

bend-kube-runtime@0.2.0.0 · src/yaml.bend:202

import bend-kube-runtime@0.2.0.0/src/yaml.bend as Yaml
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J

202# A finished block scalar, as the one line "prefix <JSON string>".
203def Yaml.block.line(b: Blk) -> Line:
204  match b:
205    case Blk{ki, prefix, folded, +chomp, bi, +acc}:
206      Line{ki, prefix ++ J.Json.show(J.JStr{
207        Yaml.block.body(List.reverse(&2, String, Yaml.unblank(acc)), folded)
208          ++ Yaml.block.tail(chomp, Yaml.blanks(acc, 0), List.is_empty(&2, String, Yaml.unblank(acc)))})}

Uses (12)

Used by (2)