##// END OF EJS Templates
Uploading a file with a name that already exists asks the user if they want to overwrite....
Uploading a file with a name that already exists asks the user if they want to overwrite. This is not perfect (it doesn't check against the real filesystem but the current list in the browser which may be stale) but it is better than nothing.

File last commit:

r17217:2f6493c8
r17648:c62f6dbb
Show More
codemirror-ipythongfm.js
44 lines | 1.5 KiB | application/javascript | JavascriptLexer
/ IPython / html / static / notebook / js / codemirror-ipythongfm.js
// IPython GFM (GitHub Flavored Markdown) mode is just a slightly altered GFM
// Mode with support for latex.
//
// Latex support was supported by Codemirror GFM as of
// https://github.com/marijnh/CodeMirror/pull/567
// But was later removed in
// https://github.com/marijnh/CodeMirror/commit/d9c9f1b1ffe984aee41307f3e927f80d1f23590c
CodeMirror.requireMode('gfm', function(){
CodeMirror.requireMode('stex', function(){
CodeMirror.defineMode("ipythongfm", function(config, parserConfig) {
var gfm_mode = CodeMirror.getMode(config, "gfm");
var tex_mode = CodeMirror.getMode(config, "stex");
return CodeMirror.multiplexingMode(
gfm_mode,
{
open: "$", close: "$",
mode: tex_mode,
delimStyle: "delimit"
},
{
open: "$$", close: "$$",
mode: tex_mode,
delimStyle: "delimit"
},
{
open: "\\(", close: "\\)",
mode: tex_mode,
delimStyle: "delimit"
},
{
open: "\\[", close: "\\]",
mode: tex_mode,
delimStyle: "delimit"
}
// .. more multiplexed styles can follow here
);
}, 'gfm');
CodeMirror.defineMIME("text/x-ipythongfm", "ipythongfm");
});
});