| 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 | |