(state)
| 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 () { |