mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Fix formatOnEnter for double newlines
This commit is contained in:
17
tests/cases/fourslash/formatOnEnter.ts
Normal file
17
tests/cases/fourslash/formatOnEnter.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
/////*3*/function listAPIFiles (path : string): string[] {
|
||||
//// /*1*/
|
||||
//// /*2*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
format.onType("1", "\n");
|
||||
verify.currentLineContentIs(" ");
|
||||
|
||||
goTo.marker("2");
|
||||
format.onType("2", "\n");
|
||||
verify.currentLineContentIs(" ");
|
||||
|
||||
goTo.marker("3");
|
||||
verify.currentLineContentIs("function listAPIFiles(path: string): string[] {");
|
||||
@@ -246,6 +246,7 @@ declare namespace FourSlashInterface {
|
||||
copyFormatOptions(): FormatCodeOptions;
|
||||
setFormatOptions(options: FormatCodeOptions): any;
|
||||
selection(startMarker: string, endMarker: string): void;
|
||||
onType(posMarker: string, key: string): void;
|
||||
setOption(name: string, value: number): any;
|
||||
setOption(name: string, value: string): any;
|
||||
setOption(name: string, value: boolean): any;
|
||||
|
||||
Reference in New Issue
Block a user