Skip to content

Commit

Permalink
CodeMirror 5.19 (#12300)
Browse files Browse the repository at this point in the history
  • Loading branch information
okonomiyaki3000 authored and zero-24 committed Oct 16, 2016
1 parent c911f30 commit e2a5d1b
Show file tree
Hide file tree
Showing 200 changed files with 333 additions and 299 deletions.
11 changes: 7 additions & 4 deletions media/editors/codemirror/addon/comment/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
self.lineComment(from, to, options);
return;
}
if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return

var end = Math.min(to.line, self.lastLine());
if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
Expand Down Expand Up @@ -162,13 +163,15 @@
var endString = options.blockCommentEnd || mode.blockCommentEnd;
if (!startString || !endString) return false;
var lead = options.blockCommentLead || mode.blockCommentLead;
var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end);
var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString);
var startLine = self.getLine(start), open = startLine.indexOf(startString)
if (open == -1) return false
var endLine = end == start ? startLine : self.getLine(end)
var close = endLine.indexOf(endString, end == start ? open + startString.length : 0);
if (close == -1 && start != end) {
endLine = self.getLine(--end);
close = endLine.lastIndexOf(endString);
close = endLine.indexOf(endString);
}
if (open == -1 || close == -1 ||
if (close == -1 ||
!/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||
!/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))
return false;
Expand Down
2 changes: 1 addition & 1 deletion media/editors/codemirror/addon/comment/comment.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion media/editors/codemirror/addon/dialog/dialog.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion media/editors/codemirror/addon/dialog/dialog.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion media/editors/codemirror/addon/display/autorefresh.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e2a5d1b

Please sign in to comment.