MCPcopy Create free account
hub / github.com/csskit/csskit / update

Function update

website/script/index.js:40–50  ·  view source on GitHub ↗
(highlights, tr)

Source from the content-addressed store, hash-verified

38 return Decoration.none;
39 },
40 update(highlights, tr) {
41 highlights = RangeSet.empty;
42 for (let e of tr.effects) {
43 if (e.is(addHighlight)) {
44 highlights = highlights.update({
45 add: [highlighter.range(e.value.from, e.value.to)],
46 });
47 }
48 }
49 return highlights;
50 },
51 provide: (f) => EditorView.decorations.from(f),
52 });
53 const effects = [addHighlight.of(range)];

Callers

nothing calls this directly

Calls 1

isMethod · 0.80

Tested by

no test coverage detected