MCPcopy
hub / github.com/coder/mux / extractTagContent

Function extractTagContent

src/node/services/systemMessage.test.ts:8–12  ·  view source on GitHub ↗
(message: string, tagName: string)

Source from the content-addressed store, hash-verified

6import { DEFAULT_RUNTIME_CONFIG } from "@/common/constants/workspace";
7
8const extractTagContent = (message: string, tagName: string): string | null => {
9 const pattern = new RegExp(`<${tagName}>\\s*([\\s\\S]*?)\\s*</${tagName}>`, "i");
10 const match = pattern.exec(message);
11 return match ? match[1].trim() : null;
12};
13import { describe, test, expect, beforeEach, afterEach, spyOn, type Mock } from "bun:test";
14import { LocalRuntime } from "@/node/runtime/LocalRuntime";
15

Callers 1

Calls 1

execMethod · 0.65

Tested by

no test coverage detected