(key: string, path: () => string)
| 1693 | |
| 1694 | // The unquoted merge key would be processed by `parse`, so it is always quoted. |
| 1695 | const printKey = (key: string, path: () => string): string => { |
| 1696 | const printed = key === "<<" ? doubleQuote(key) : printSingleLine(key) |
| 1697 | if (printed.length > implicitKeyLimit) { |
| 1698 | throw new PrintError( |
| 1699 | `Cannot print a mapping key of ${printed.length} characters (implicit keys are limited to ${implicitKeyLimit}) at ${path()}` |
| 1700 | ) |
| 1701 | } |
| 1702 | return printed |
| 1703 | } |
| 1704 | |
| 1705 | // Indentation strings, built once per width. |
| 1706 | const pads: Array<string> = [] |
no test coverage detected