MCPcopy
hub / github.com/pingcap/docs-cn / extractLinkNodeFromAst

Function extractLinkNodeFromAst

scripts/utils.js:42–50  ·  view source on GitHub ↗
(mdAst)

Source from the content-addressed store, hash-verified

40// };
41
42const extractLinkNodeFromAst = (mdAst) => {
43 const linkList = [];
44 visit(mdAst, (node) => {
45 if (node.type === "link") {
46 linkList.push(node.url);
47 }
48 });
49 return linkList;
50};
51
52const filterLink = (srcList = []) => {
53 const result = srcList.filter((item) => {

Callers 1

getAllMdListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected