Merge pull request #4330 from SaschaNaz/formatTsx

Fix JsxElement formatting
This commit is contained in:
Mohamed Hegazy 2015-08-17 11:57:45 -07:00
commit 96286e9400
2 changed files with 20 additions and 0 deletions

View file

@ -428,6 +428,7 @@ namespace ts.formatting {
case SyntaxKind.ConditionalExpression:
case SyntaxKind.ArrayBindingPattern:
case SyntaxKind.ObjectBindingPattern:
case SyntaxKind.JsxElement:
return true;
}
return false;

View file

@ -0,0 +1,19 @@
/// <reference path='fourslash.ts' />
//@Filename: file.tsx
////function () {
//// return (
//// <div className="commentBox" >
////Hello, World!/*autoformat*/
/////*indent*/
//// </div>
//// )
////}
////
format.document();
goTo.marker("autoformat");
verify.currentLineContentIs(' Hello, World!');
goTo.marker("indent");
verify.indentationIs(12);