UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

15 lines • 482 B
/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ const VALID_PLACEHOLDER_MATCH_PATTERN = /\{(PLACEHOLDER_[a-zA-Z][a-zA-Z0-9_]*)\}/g; export function substitutePlaceholders(rawMarkdown, substitutions) { if (!substitutions) { return rawMarkdown; } return rawMarkdown.replace(VALID_PLACEHOLDER_MATCH_PATTERN, (_, placeholder) => { return substitutions.get(placeholder) ?? ''; }); } //# sourceMappingURL=text.js.map