MCPcopy Create free account
hub / github.com/TruthHun/BookStack / propagate

Function propagate

static/editor.md/lib/codemirror/lib/codemirror.js:7502–7511  ·  view source on GitHub ↗
(doc, skip, sharedHist)

Source from the content-addressed store, hash-verified

7500 // Call f for all linked documents.
7501 function linkedDocs(doc, f, sharedHistOnly) {
7502 function propagate(doc, skip, sharedHist) {
7503 if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
7504 var rel = doc.linked[i];
7505 if (rel.doc == skip) continue;
7506 var shared = sharedHist && rel.sharedHist;
7507 if (sharedHistOnly && !shared) continue;
7508 f(rel.doc, shared);
7509 propagate(rel.doc, doc, shared);
7510 }
7511 }
7512 propagate(doc, null, true);
7513 }
7514

Callers 1

linkedDocsFunction · 0.70

Calls 1

fFunction · 0.50

Tested by

no test coverage detected