Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / cm / headlesscodemirror.js
index 67c7866..a2740e4 100644 (file)
@@ -1,6 +1,9 @@
 // Content of the function is equal to runmode-standalone.js file
 // from CodeMirror distribution
 (function(window) {
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
 window.CodeMirror = {};
 
 (function() {
@@ -142,6 +145,7 @@ CodeMirror.runMode = function (string, modespec, callback, options) {
   for (var i = 0, e = lines.length; i < e; ++i) {
     if (i) callback("\n");
     var stream = new CodeMirror.StringStream(lines[i]);
+    if (!stream.string && mode.blankLine) mode.blankLine(state);
     while (!stream.eol()) {
       var style = mode.token(stream, state);
       callback(stream.current(), style, i, stream.start, state);
@@ -150,5 +154,4 @@ CodeMirror.runMode = function (string, modespec, callback, options) {
   }
 };
 })();
-
 }(this))