MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / addPluginPattern

Function addPluginPattern

mini-code-edit/cm/mode/stex/stex.js:37–58  ·  view source on GitHub ↗
(pluginName, cmdStyle, brackets, styles)

Source from the content-addressed store, hash-verified

35 }
36
37 function addPluginPattern(pluginName, cmdStyle, brackets, styles) {
38 return function () {
39 this.name=pluginName;
40 this.bracketNo = 0;
41 this.style=cmdStyle;
42 this.styles = styles;
43 this.brackets = brackets;
44
45 this.styleIdentifier = function(content) {
46 if (this.bracketNo<=this.styles.length)
47 return this.styles[this.bracketNo-1];
48 else
49 return null;
50 };
51 this.openBracket = function(content) {
52 this.bracketNo++;
53 return "bracket";
54 };
55 this.closeBracket = function(content) {
56 };
57 }
58 }
59
60 var plugins = new Array();
61

Callers 1

stex.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected