Closed scottgulliver closed 10 years ago
That is awesome, just tried it out. Also FYI i am going to write some UI automation tests (which for some reason are super slow for me at the moment... will look into that.)
public class PairedCharactersFacts : MarkpadUiTest
{
[Fact]
public void InsertsPairedCharacters()
{
var document = MainWindow.NewDocument();
var editor = document.Editor();
editor.TypeText("\"");
editor.PressKey(KeyboardInput.SpecialKeys.RIGHT);
editor.TypeText("'");
editor.PressKey(KeyboardInput.SpecialKeys.RIGHT);
editor.TypeText("(");
editor.PressKey(KeyboardInput.SpecialKeys.RIGHT);
editor.TypeText("{");
editor.PressKey(KeyboardInput.SpecialKeys.RIGHT);
editor.TypeText("[");
editor.PressKey(KeyboardInput.SpecialKeys.RIGHT);
editor.TypeText("<");
editor.PressKey(KeyboardInput.SpecialKeys.RIGHT);
Assert.Equal("\"\"''(){}[]<>", editor.MarkdownText);
}
[Fact]
public void CanOverwritePairedCharacter()
{
var document = MainWindow.NewDocument();
var editor = document.Editor();
editor.TypeText("[Link test](http://google.com)");
Assert.Equal("[Link test](http://google.com)", editor.MarkdownText);
}
}
Implemented paired characters, as described in issue #266. For the characters (), [], {}, '', "", <>: