This is the problem code.
I want to change Space Indent to Tab Indent.
// use Bridge.NRefactory.5.5.4
using System;
using ICSharpCode.NRefactory.CSharp;
using ICSharpCode.NRefactory.Editor;
namespace Foo
{
class MainClass
{
public static void Main (string [] args)
{
var policy = FormattingOptionsFactory.CreateMono();
var formatter = new CSharpFormatter(policy);
formatter.TextEditorOptions.TabsToSpaces = false;
var text = @"
namespace Foo
{
public class Bar
{
public void MethodA()
{
Promise.All
(
MethodB(),
MethodC(),
() => {}
);
}
}
}
";
var document = new StringBuilderDocument(text);
var syntaxTree = SyntaxTree.Parse(document, document.FileName);
var changes = formatter.AnalyzeFormatting(document, syntaxTree);
changes.ApplyChanges();
Console.WriteLine(document.Text.Replace('\t', '>'));
Console.ReadLine();
}
}
}
This is the problem code. I want to change Space Indent to Tab Indent.
Output (Replace Tab to ">" for github)
Why does Line 8 have white space indent?