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

Function themeChanged

lib/web/CodeMirror/src/edit/utils.js:3–7  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

1import { clearCaches } from "../measurement/position_measurement.js"
2
3export function themeChanged(cm) {
4 cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
5 cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-")
6 clearCaches(cm)
7}

Callers 2

defineOptionsFunction · 0.90
CodeMirrorFunction · 0.90

Calls 2

clearCachesFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected