##// END OF EJS Templates
Merge Security Pull Request: google-caja...
Merge Security Pull Request: google-caja Adds HTML sanitization. The basics: - untrusted HTML is always sanitized, with no warning (there is console logging for changes made) - markdown is always treated as untrusted - no warnings for simply excluded output (e.g. Javascript) - CSS tags and attributes are always stripped from untrusted HTML - never check whether HTML is "safe," only sanitize - add 'Trust notebook' to File menu

File last commit:

r12103:dc60758c
r15674:f33c5e99 merge
Show More
codemirror-ipython.js
17 lines | 655 B | application/javascript | JavascriptLexer
// IPython mode is just a slightly altered Python Mode with `?` beeing a extra
// single operator. Here we define `ipython` mode in the require `python`
// callback to auto-load python mode, which is more likely not the best things
// to do, but at least the simple one for now.
CodeMirror.requireMode('python',function(){
"use strict";
CodeMirror.defineMode("ipython", function(conf, parserConf) {
parserConf.singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\\?]");
parserConf.name = 'python'
return CodeMirror.getMode(conf, parserConf);
}, 'python');
CodeMirror.defineMIME("text/x-ipython", "ipython");
})