MCPcopy Create free account
hub / github.com/Consensys/doc.linea / getCodeLanguage

Function getCodeLanguage

scripts/agent-docs/lib.js:169–177  ·  view source on GitHub ↗
(...nodes)

Source from the content-addressed store, hash-verified

167 const turndown = new TurndownService({
168 bulletListMarker: "-",
169 codeBlockStyle: "fenced",
170 headingStyle: "atx",
171 });
172
173 turndown.use(gfm);
174
175 function getCodeText(code) {
176 const tokenLines = Array.from(code.querySelectorAll(".token-line"));
177 if (tokenLines.length) {
178 return tokenLines.map((line) => line.textContent).join("\n");
179 }
180

Callers 1

replacementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected