Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions mode/coffeescript/coffeescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ CodeMirror.defineMode('coffeescript', function(conf) {
return "comment";
}

function indent(stream, state, type) {
type = type || 'coffee';
function indent(stream, state, type = 'coffee') {
var indentUnit = 0;
if (type === 'coffee') {
for (var i = 0; i < state.scopes.length; i++) {
Expand Down
6 changes: 2 additions & 4 deletions mode/python/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ CodeMirror.defineMode("python", function(conf, parserConf) {
return tokenString;
}

function indent(stream, state, type) {
type = type || 'py';
function indent(stream, state, type = 'py') {
var indentUnit = 0;
if (type === 'py') {
if (state.scopes[0].type !== 'py') {
Expand All @@ -220,8 +219,7 @@ CodeMirror.defineMode("python", function(conf, parserConf) {
});
}

function dedent(stream, state, type) {
type = type || 'py';
function dedent(stream, state, type = 'py') {
if (state.scopes.length == 1) return;
if (state.scopes[0].type === 'py') {
var _indent = stream.indentation();
Expand Down