( parts: string[], heredocs: Map<string, HeredocInfo>, )
| 709 | * @returns New array with placeholders replaced by original heredoc content |
| 710 | */ |
| 711 | export function restoreHeredocs( |
| 712 | parts: string[], |
| 713 | heredocs: Map<string, HeredocInfo>, |
| 714 | ): string[] { |
| 715 | if (heredocs.size === 0) { |
| 716 | return parts |
| 717 | } |
| 718 | |
| 719 | return parts.map(part => restoreHeredocsInString(part, heredocs)) |
| 720 | } |
| 721 | |
| 722 | /** |
| 723 | * Checks if a command contains heredoc syntax. |
no test coverage detected