kopia lustrzana https://github.com/c9/core
fix quote pairing for "\n"
rodzic
ad38f83962
commit
3962a9c04f
|
@ -144,6 +144,16 @@ module.exports = {
|
|||
exec("selectleft", 1);
|
||||
exec("insertstring", 1, '"');
|
||||
assert.equal(editor.getValue(), '("foo")');
|
||||
|
||||
editor.setValue("", 1);
|
||||
exec("selectleft", 1);
|
||||
exec("insertstring", 1, '"');
|
||||
assert.equal(editor.getValue(), '""');
|
||||
exec("insertstring", 1, '\\');
|
||||
exec("insertstring", 1, 'n');
|
||||
exec("insertstring", 1, '"');
|
||||
assert.equal(editor.getValue(), '"\\n"');
|
||||
|
||||
},
|
||||
"test: xml": function() {
|
||||
editor = new Editor(new MockRenderer());
|
||||
|
|
|
@ -269,8 +269,8 @@ var CstyleBehaviour = function() {
|
|||
if (leftChar == "\\" && token && /escape/.test(token.type))
|
||||
return null;
|
||||
|
||||
var stringBefore = token && /string/.test(token.type);
|
||||
var stringAfter = !rightToken || /string/.test(rightToken.type);
|
||||
var stringBefore = token && /string|escape/.test(token.type);
|
||||
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
||||
|
||||
var pair;
|
||||
if (rightChar == quote) {
|
||||
|
|
Ładowanie…
Reference in New Issue