MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / linkedDocs

Function linkedDocs

lib/web/CodeMirror/src/model/document_data.js:75–87  ·  view source on GitHub ↗
(doc, f, sharedHistOnly)

Source from the content-addressed store, hash-verified

73
74// Call f for all linked documents.
75export function linkedDocs(doc, f, sharedHistOnly) {
76 function propagate(doc, skip, sharedHist) {
77 if (doc.linked) for (let i = 0; i < doc.linked.length; ++i) {
78 let rel = doc.linked[i]
79 if (rel.doc == skip) continue
80 let shared = sharedHist && rel.sharedHist
81 if (sharedHistOnly && !shared) continue
82 f(rel.doc, shared)
83 propagate(rel.doc, doc, shared)
84 }
85 }
86 propagate(doc, null, true)
87}
88
89// Attach a document to an editor.
90export function attachDoc(cm, doc) {

Callers 6

Doc.jsFile · 0.90
historyChangeFromChangeFunction · 0.90
markTextSharedFunction · 0.90
detachSharedMarkersFunction · 0.90
makeChangeInnerFunction · 0.90
makeChangeFromHistoryFunction · 0.90

Calls 1

propagateFunction · 0.70

Tested by

no test coverage detected