MCPcopy Index your code
hub / github.com/codeaashu/claude-code / restoreHeredocsInString

Function restoreHeredocsInString

src/utils/bash/heredoc.ts:693–702  ·  view source on GitHub ↗

* Restores heredoc placeholders back to their original content in a single string. * Internal helper used by restoreHeredocs.

(
  text: string,
  heredocs: Map<string, HeredocInfo>,
)

Source from the content-addressed store, hash-verified

691 * Internal helper used by restoreHeredocs.
692 */
693function restoreHeredocsInString(
694 text: string,
695 heredocs: Map<string, HeredocInfo>,
696): string {
697 let result = text
698 for (const [placeholder, info] of heredocs) {
699 result = result.replaceAll(placeholder, info.fullText)
700 }
701 return result
702}
703
704/**
705 * Restores heredoc placeholders in an array of strings.

Callers 1

restoreHeredocsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected