MCPcopy Create free account
hub / github.com/codeaashu/claude-code / process

Function process

web/lib/workers/markdown.worker.ts:53–62  ·  view source on GitHub ↗
(msg: InMessage)

Source from the content-addressed store, hash-verified

51}
52
53function process(msg: InMessage): OutMessage {
54 const lines = msg.markdown.split("\n");
55 const tokens: TokenLine[] = lines.map(classifyLine);
56 const headings = tokens
57 .filter((t): t is TokenLine & { type: "heading" } => t.type === "heading")
58 .map((t) => ({ level: t.level!, text: t.content }));
59 const codeBlockCount = tokens.filter((t) => t.type === "code-fence").length;
60
61 return { id: msg.id, tokens, headings, codeBlockCount };
62}
63
64self.addEventListener("message", (e: MessageEvent<InMessage>) => {
65 self.postMessage(process(e.data));

Callers 1

markdown.worker.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected