mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-23 04:38:42 +00:00
96d4a3ecf7
Due to historical reasons, the code is in subfolder "1". With SVN removal, we place the code back and remove the annoying "1" folder.
34 lines
810 B
JavaScript
34 lines
810 B
JavaScript
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
// Distributed under an MIT license: http://codemirror.net/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 $][inner&tag \\pi][delim $]");
|
|
})();
|