def import_doc.of
import bend-lint-rules@0.2.0.0/layout/format.bend as Formatimport Base
2159def import_doc.of(h: Hash) -> Doc:
2160 match h:
2161 case Hash{before, None{}}:
2162 str(alias(import_space(trim_end(before))))
2163 case Hash{before, Some{+comment}}:
2164 cat(
2165 [
2166 str(alias(import_space(trim_end(before)))),
2167 space(" ", 2),
2168 str(comment_text(comment, comment))
2169 ]
2170 )