Skip to content

Commit d3616a1

Browse files
committed
Merge pull request #43 from google/devoncarew_5.2.0
5.2.0
2 parents 221756c + 9992cf6 commit d3616a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1014
-4266
lines changed

README_.google

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
URL: http://codemirror.net/
2-
Version: 5.1.0
2+
Version: 5.2.0
33
License: MIT
44
License File: third_party/codemirror/LICENSE
55

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "codemirror.dart",
33
"private": true,
44
"dependencies": {
5-
"codemirror": "~5.1.0"
5+
"codemirror": "~5.2.0"
66
}
77
}

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
# 0.2.7
4+
- updated to CodeMirror 5.2.0
45
- bug fix to `Doc.getModeAt`
56
- added `Doc.getModeName()` and `Doc.getModeNameAt()` methods
67

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# license that can be found in the LICENSE file.
44

55
name: codemirror
6-
version: 0.2.6+5.1.0
6+
version: 0.2.7+5.2.0
77
description: A Dart wrapper around the CodeMirror text editor.
88
author: Devon Carew <[email protected]>
99
homepage: https://github.com/google/codemirror.dart

third_party/codemirror/.bower.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codemirror",
3-
"version": "5.1.0",
3+
"version": "5.2.0",
44
"main": [
55
"lib/codemirror.js",
66
"lib/codemirror.css"
@@ -14,16 +14,18 @@
1414
"doc",
1515
"test",
1616
"index.html",
17-
"package.json"
17+
"package.json",
18+
"mode/*/*test.js",
19+
"mode/*/*.html"
1820
],
1921
"homepage": "https://github.com/marijnh/CodeMirror",
20-
"_release": "5.1.0",
22+
"_release": "5.2.0",
2123
"_resolution": {
2224
"type": "version",
23-
"tag": "5.1.0",
24-
"commit": "8fa467e250d68a567bbc7759a921aed7329ecbca"
25+
"tag": "5.2.0",
26+
"commit": "8deccbd02af7b3569a970c0c5af0ddfc92302c95"
2527
},
2628
"_source": "git://github.com/marijnh/CodeMirror.git",
27-
"_target": "~5.1.0",
29+
"_target": "~5.2.0",
2830
"_originalSource": "codemirror"
2931
}

third_party/codemirror/AUTHORS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Alexandre Bique
2525
alexey-k
2626
Alex Piggott
2727
Aliaksei Chapyzhenka
28+
Amin Shali
2829
Amsul
2930
amuntean
3031
Amy
@@ -81,10 +82,13 @@ Cheah Chu Yeow
8182
Chris Coyier
8283
Chris Granger
8384
Chris Houseknecht
85+
Chris Lohfink
8486
Chris Morgan
8587
Christian Oyarzun
8688
Christian Petrov
8789
Christopher Brown
90+
Christopher Mitchell
91+
Christopher Pfohl
8892
ciaranj
8993
CodeAnimal
9094
coderaiser
@@ -106,6 +110,7 @@ Danny Yoo
106110
darealshinji
107111
Darius Roberts
108112
Dave Myers
113+
David Barnett
109114
David Mignot
110115
David Pathakjee
111116
David Vázquez
@@ -182,6 +187,7 @@ ilvalle
182187
Ingo Richter
183188
Irakli Gozalishvili
184189
Ivan Kurnosov
190+
Ivoah
185191
Jacob Lee
186192
Jakob Miland
187193
Jakub Vrana
@@ -213,6 +219,7 @@ John Connor
213219
John Lees-Miller
214220
John Snelson
215221
John Van Der Loo
222+
Jonas Döbertin
216223
Jonathan Malmaud
217224
jongalloway
218225
Jon Malmaud
@@ -223,6 +230,7 @@ Joshua Newman
223230
Josh Watzman
224231
jots
225232
jsoojeon
233+
ju1ius
226234
Juan Benavides Romero
227235
Jucovschi Constantin
228236
Juho Vuori
@@ -250,6 +258,8 @@ Leonid Khachaturov
250258
Leon Sorokin
251259
Leonya Khachaturov
252260
Liam Newman
261+
Libo Cannici
262+
LloydMilligan
253263
LM
254264
lochel
255265
Lorenzo Stoakes
@@ -274,6 +284,7 @@ Marko Bonaci
274284
Martin Balek
275285
Martín Gaitán
276286
Martin Hasoň
287+
Martin Hunt
277288
Mason Malone
278289
Mateusz Paprocki
279290
Mathias Bynens
@@ -292,6 +303,7 @@ Max Xiantu
292303
mbarkhau
293304
Metatheos
294305
Micah Dubinko
306+
Michael Grey
295307
Michael Lehenbauer
296308
Michael Zhou
297309
Mighty Guava
@@ -308,6 +320,7 @@ misfo
308320
mloginov
309321
Moritz Schwörer
310322
mps
323+
ms
311324
mtaran-google
312325
Narciso Jaramillo
313326
Nathan Williams
@@ -319,6 +332,7 @@ nguillaumin
319332
Ng Zhi An
320333
Nicholas Bollweg
321334
Nicholas Bollweg (Nick)
335+
Nick Kreeger
322336
Nick Small
323337
Niels van Groningen
324338
nightwing
@@ -333,6 +347,7 @@ pablo
333347
Page
334348
Panupong Pasupat
335349
paris
350+
Paris
336351
Patil Arpith
337352
Patrick Stoica
338353
Patrick Strawderman

third_party/codemirror/addon/display/panel.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,31 @@
1010
mod(CodeMirror);
1111
})(function(CodeMirror) {
1212
CodeMirror.defineExtension("addPanel", function(node, options) {
13+
options = options || {};
14+
1315
if (!this.state.panels) initPanels(this);
1416

1517
var info = this.state.panels;
16-
if (options && options.position == "bottom")
17-
info.wrapper.appendChild(node);
18-
else
19-
info.wrapper.insertBefore(node, info.wrapper.firstChild);
18+
var wrapper = info.wrapper;
19+
var cmWrapper = this.getWrapperElement();
20+
21+
if (options.after instanceof Panel && !options.after.cleared) {
22+
wrapper.insertBefore(node, options.before.node.nextSibling);
23+
} else if (options.before instanceof Panel && !options.before.cleared) {
24+
wrapper.insertBefore(node, options.before.node);
25+
} else if (options.replace instanceof Panel && !options.replace.cleared) {
26+
wrapper.insertBefore(node, options.replace.node);
27+
options.replace.clear();
28+
} else if (options.position == "bottom") {
29+
wrapper.appendChild(node);
30+
} else if (options.position == "before-bottom") {
31+
wrapper.insertBefore(node, cmWrapper.nextSibling);
32+
} else if (options.position == "after-top") {
33+
wrapper.insertBefore(node, cmWrapper);
34+
} else {
35+
wrapper.insertBefore(node, wrapper.firstChild);
36+
}
37+
2038
var height = (options && options.height) || node.offsetHeight;
2139
this._setSize(null, info.heightLeft -= height);
2240
info.panels++;

third_party/codemirror/addon/edit/continuelist.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@
1919
if (cm.getOption("disableInput")) return CodeMirror.Pass;
2020
var ranges = cm.listSelections(), replacements = [];
2121
for (var i = 0; i < ranges.length; i++) {
22-
var pos = ranges[i].head, match;
22+
var pos = ranges[i].head;
2323
var eolState = cm.getStateAfter(pos.line);
2424
var inList = eolState.list !== false;
25-
var inQuote = eolState.quote !== false;
25+
var inQuote = eolState.quote !== 0;
2626

27-
if (!ranges[i].empty() || (!inList && !inQuote) || !(match = cm.getLine(pos.line).match(listRE))) {
27+
var line = cm.getLine(pos.line), match = listRE.exec(line);
28+
if (!ranges[i].empty() || (!inList && !inQuote) || !match) {
2829
cm.execCommand("newlineAndIndent");
2930
return;
3031
}
31-
if (cm.getLine(pos.line).match(emptyListRE)) {
32+
if (emptyListRE.test(line)) {
3233
cm.replaceRange("", {
3334
line: pos.line, ch: 0
3435
}, {
3536
line: pos.line, ch: pos.ch + 1
3637
});
3738
replacements[i] = "\n";
38-
3939
} else {
4040
var indent = match[1], after = match[4];
4141
var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0

third_party/codemirror/addon/lint/javascript-lint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
function validator(text, options) {
2525
if (!window.JSHINT) return [];
26-
JSHINT(text, options);
26+
JSHINT(text, options, options.globals);
2727
var errors = JSHINT.data().errors, result = [];
2828
if (errors) parseErrors(errors, result);
2929
return result;

third_party/codemirror/addon/mode/multiplex.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
CodeMirror.multiplexingMode = function(outer /*, others */) {
1515
// Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects
1616
var others = Array.prototype.slice.call(arguments, 1);
17-
var n_others = others.length;
1817

19-
function indexOf(string, pattern, from) {
20-
if (typeof pattern == "string") return string.indexOf(pattern, from);
18+
function indexOf(string, pattern, from, returnEnd) {
19+
if (typeof pattern == "string") {
20+
var found = string.indexOf(pattern, from);
21+
return returnEnd && found > -1 ? found + pattern.length : found;
22+
}
2123
var m = pattern.exec(from ? string.slice(from) : string);
22-
return m ? m.index + from : -1;
24+
return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;
2325
}
2426

2527
return {
@@ -42,11 +44,11 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
4244
token: function(stream, state) {
4345
if (!state.innerActive) {
4446
var cutOff = Infinity, oldContent = stream.string;
45-
for (var i = 0; i < n_others; ++i) {
47+
for (var i = 0; i < others.length; ++i) {
4648
var other = others[i];
4749
var found = indexOf(oldContent, other.open, stream.pos);
4850
if (found == stream.pos) {
49-
stream.match(other.open);
51+
if (!other.parseDelimiters) stream.match(other.open);
5052
state.innerActive = other;
5153
state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, "") : 0);
5254
return other.delimStyle;
@@ -64,8 +66,8 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
6466
state.innerActive = state.inner = null;
6567
return this.token(stream, state);
6668
}
67-
var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos) : -1;
68-
if (found == stream.pos) {
69+
var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;
70+
if (found == stream.pos && !curInner.parseDelimiters) {
6971
stream.match(curInner.close);
7072
state.innerActive = state.inner = null;
7173
return curInner.delimStyle;
@@ -74,6 +76,9 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
7476
var innerToken = curInner.mode.token(stream, state.inner);
7577
if (found > -1) stream.string = oldContent;
7678

79+
if (found == stream.pos && curInner.parseDelimiters)
80+
state.innerActive = state.inner = null;
81+
7782
if (curInner.innerStyle) {
7883
if (innerToken) innerToken = innerToken + ' ' + curInner.innerStyle;
7984
else innerToken = curInner.innerStyle;
@@ -95,7 +100,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
95100
mode.blankLine(state.innerActive ? state.inner : state.outer);
96101
}
97102
if (!state.innerActive) {
98-
for (var i = 0; i < n_others; ++i) {
103+
for (var i = 0; i < others.length; ++i) {
99104
var other = others[i];
100105
if (other.open === "\n") {
101106
state.innerActive = other;

0 commit comments

Comments
 (0)