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

Function getMostPowerful

static/editor.md/lib/codemirror/mode/stex/stex.js:42–52  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

40
41 // returns the non-default plugin closest to the end of the list
42 function getMostPowerful(state) {
43 var context = state.cmdState;
44 for (var i = context.length - 1; i >= 0; i--) {
45 var plug = context[i];
46 if (plug.name == "DEFAULT") {
47 continue;
48 }
49 return plug;
50 }
51 return { styleIdentifier: function() { return null; } };
52 }
53
54 function addPluginPattern(pluginName, cmdStyle, styles) {
55 return function () {

Callers 1

normalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected