(str: string)
| 813 | |
| 814 | /** @internal */ |
| 815 | export const string = (str: string): Doc.Doc<never> => { |
| 816 | return cats( |
| 817 | str.split("\n").map((s) => |
| 818 | s.length === 0 |
| 819 | ? empty |
| 820 | : s.length === 1 |
| 821 | ? char(s) |
| 822 | : text(s) |
| 823 | ) |
| 824 | ) |
| 825 | } |
| 826 | |
| 827 | /** @internal */ |
| 828 | export const surround = dual< |