提交 de54cb5a 编写于 作者: A Alex Dima

Fixes #4065: Catch the copyright case in the onEnterRules

上级 9823c9d7
......@@ -180,6 +180,11 @@ class LanguageProvider {
// e.g. */|
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
},
{
// e.g. *-----*/|
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
}
],
......
......@@ -48,6 +48,11 @@ class MockJSMode extends MockTokenizingMode {
// e.g. */|
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
},
{
// e.g. *-----*/|
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
}
]
});
......
......@@ -64,6 +64,11 @@ class DocBlockCommentMode extends MockMode {
// e.g. */|
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
},
{
// e.g. *-----*/|
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
}
]
});
......
......@@ -93,6 +93,10 @@ suite('OnEnter', () => {
{
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
},
{
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
}
]
});
......@@ -131,7 +135,7 @@ suite('OnEnter', () => {
testIndentAction('\t*', '', null, null);
testIndentAction('\t *', '', IndentAction.None, '* ');
testIndentAction('\t */', '', IndentAction.None, null, 1);
testIndentAction('\t * */', '', null, null);
testIndentAction('\t * */', '', IndentAction.None, null, 1);
testIndentAction('\t * * / * / * / */', '', null, null);
testIndentAction('\t * ', '', IndentAction.None, '* ');
testIndentAction(' * ', '', IndentAction.None, '* ');
......@@ -146,5 +150,6 @@ suite('OnEnter', () => {
testIndentAction(' */', '', IndentAction.None, null, 1);
testIndentAction(' */', '', IndentAction.None, null, 1);
testIndentAction('\t */', '', IndentAction.None, null, 1);
testIndentAction(' *--------------------------------------------------------------------------------------------*/', '', IndentAction.None, null, 1);
});
});
\ No newline at end of file
......@@ -60,6 +60,11 @@ class MockJSMode extends MockTokenizingMode {
// e.g. */|
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
action: { indentAction: Modes.IndentAction.None, removeText: 1 }
},
{
// e.g. *-----*/|
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: Modes.IndentAction.None, removeText: 1 }
}
]
});
......
......@@ -73,6 +73,11 @@ const richEditConfiguration:IRichEditConfiguration = {
// e.g. */|
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
action: { indentAction: modes.IndentAction.None, removeText: 1 }
},
{
// e.g. *-----*/|
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: modes.IndentAction.None, removeText: 1 }
}
],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册