PHP Classes

File: editor/codemirror/addon/mode/multiplex_test.js

Recommend this page to a friend!
  Classes of Cedric Maenetja   Custom PHP HTML Parser   editor/codemirror/addon/mode/multiplex_test.js   Download  
File: editor/codemirror/addon/mode/multiplex_test.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Custom PHP HTML Parser
Process HTML to replace it with parameter values
Author: By
Last change:
Date: 1 year ago
Size: 1,367 bytes
 

Contents

Class file image Download
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/5/LICENSE (function() { CodeMirror.defineMode("markdown_with_stex", function(){ var inner = CodeMirror.getMode({}, "stex"); var outer = CodeMirror.getMode({}, "markdown"); var innerOptions = { open: '$', close: '$', mode: inner, delimStyle: 'delim', innerStyle: 'inner' }; return CodeMirror.multiplexingMode(outer, innerOptions); }); var mode = CodeMirror.getMode({}, "markdown_with_stex"); function MT(name) { test.mode( name, mode, Array.prototype.slice.call(arguments, 1), 'multiplexing'); } MT( "stexInsideMarkdown", "[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]"); CodeMirror.defineMode("identical_delim_multiplex", function() { return CodeMirror.multiplexingMode(CodeMirror.getMode({indentUnit: 2}, "javascript"), { open: "#", close: "#", mode: CodeMirror.getMode({}, "markdown"), parseDelimiters: true, innerStyle: "q" }); }); var mode2 = CodeMirror.getMode({}, "identical_delim_multiplex"); test.mode("identical_delimiters_with_parseDelimiters", mode2, [ "[keyword let] [def x] [operator =] [q #foo][q&em *bar*][q #];" ], "multiplexing") })();