File tree Expand file tree Collapse file tree 3 files changed +9138
-2
lines changed Expand file tree Collapse file tree 3 files changed +9138
-2
lines changed Original file line number Diff line number Diff line change 55 "backbone" : " components/backbone#~1.2" ,
66 "bootstrap" : " components/bootstrap#~3.3" ,
77 "bootstrap-tour" : " 0.9.0" ,
8- "codemirror" : " components/codemirror#~5.16 " ,
8+ "codemirror" : " components/codemirror#~5.22.2 " ,
99 "es6-promise" : " ~1.0" ,
1010 "font-awesome" : " components/font-awesome#~4.2.0" ,
1111 "google-caja" : " 5669" ,
Original file line number Diff line number Diff line change 1515
1616import os
1717import sys
18+ import shutil
1819
1920import pipes
2021from distutils import log
@@ -348,7 +349,16 @@ def should_run_npm(self):
348349 if not os .path .exists (self .node_modules ):
349350 return True
350351 return mtime (self .node_modules ) < mtime (pjoin (repo_root , 'package.json' ))
351-
352+
353+ def patch_codemirror (self ):
354+ """Patch CodeMirror until https://github.com/codemirror/CodeMirror/issues/4454 is resolved"""
355+
356+ try :
357+ shutil .copyfile ('tools/patches/codemirror.js' , 'notebook/static/components/codemirror/lib/codemirror.js' )
358+ except OSError as e :
359+ print ("Failed to patch codemirror.js: %s" % e , file = sys .stderr )
360+ raise
361+
352362 def run (self ):
353363 if not self .should_run ():
354364 print ("bower dependencies up to date" )
@@ -372,6 +382,8 @@ def run(self):
372382 print ("Failed to run bower: %s" % e , file = sys .stderr )
373383 print ("You can install js dependencies with `npm install`" , file = sys .stderr )
374384 raise
385+
386+ self .patch_codemirror ()
375387 os .utime (self .bower_dir , None )
376388 # update package data in case this created new files
377389 update_package_data (self .distribution )
You can’t perform that action at this time.
0 commit comments