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

Function interpret

static/mergely/lib/codemirror.js:5289–5291  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

5287 setSize: methodOp(function(width, height) {
5288 var cm = this;
5289 function interpret(val) {
5290 return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
5291 }
5292 if (width != null) cm.display.wrapper.style.width = interpret(width);
5293 if (height != null) cm.display.wrapper.style.height = interpret(height);
5294 if (cm.options.lineWrapping) clearLineMeasurementCache(this);

Callers 1

codemirror.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected