Update CodeMirror to 5.5, and add new syntax modes.

Review Request #7541 — Created July 25, 2015 and submitted

Information

Review Board
release-2.5.x

Reviewers

We've been on CodeMirror 3.23, and attempted an upgrade to 4.2 in the
past. That upgrade resulted in infinite loops and display problems, so
we abandoned it. It seems though that CodeMirror 5.5 is pretty stable
for our needs, and has the added benefit of mobile support, so we're
switching over as a trial run.

This was also build with additional syntax highlighter modes for
CoffeeScript, CSS, Go, HTML, Perl, PHP, Python, ReStructuredText, Ruby,
shell scripts, SQL, XML, and YAML. This will help with providing a
better preview of code when writing using Markdown triple-backticks.

Along with these additions, I've turned off the elasticChars switch,
which attempted to match up braces to the correct indentation level. This
wasn't working in practice for us, for some reason, and it's best not to be
too much like an IDE when people are expecting a typical text field.

Tested this in Chrome, Firefox, and iOS. I didn't see any of the
lockups or anything we had before (which may be due to fixes in
CodeMirror, or fixes in our event handling, which may have previously
triggered infinite loops).

I tested each of the new syntax modes, and they seem to work well.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/static/lib/js/README.codemirror
        reviewboard/static/rb/js/ui/views/textEditorView.js
        reviewboard/static/lib/js/codemirror-5.5.min.js
        reviewboard/static/lib/js/codemirror-3.23.min.js
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/staticbundles.py
    
    Ignored Files:
        reviewboard/static/lib/js/README.codemirror
        reviewboard/static/rb/js/ui/views/textEditorView.js
        reviewboard/static/lib/js/codemirror-5.5.min.js
        reviewboard/static/lib/js/codemirror-3.23.min.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (fe6e605)
Loading...