Swashbuckle.Tests/Swagger/XmlTextHelperTests.cs
/// <summary>
/// NB: Having a code block as the first line means it can't discern the indentation correctly
/// </summary>
Having a code block as the first line means it can't discern the indentation correctly
Having a code block as the first line means it can ' t discern the indentation correctly
[Test]
        public void XmlComment_handles_code_on_the_first_line_when_subsequent_non_code_lines_are_present()
        {
            string input = @"
    POST /api/test
    {
      ""prop1"": {
        ""name"": ""value"",
        ...
      },
      ""prop2"": {
        ""name"": ""value"",
        ...
      }
    }
The above is a sample code block
";
            string expectedButUndesired = 
@"    POST /api/test
    {
      ""prop1"": {
        ""name"": ""value"",
        ...
      },
      ""prop2"": {
        ""name"": ""value"",
        ...
      }
    }
The above is a sample code block";
            string actual = XmlTextHelper.NormalizeIndentation(input);
            Assert.AreEqual(expectedButUndesired, actual);
        }
[ Test ] public void XmlComment_handles_code_on_the_first_line_when_subsequent_non_code_lines_are_present ( ) { string input = @"
    POST /api/test
    
    {
      ""prop1"": {
        ""name"": ""value"",
        ...
      },
      ""prop2"": {
        ""name"": ""value"",
        ...
      }
    }

The above is a sample code block
" ; string expectedButUndesired = @"    POST /api/test
    
    {
      ""prop1"": {
        ""name"": ""value"",
        ...
      },
      ""prop2"": {
        ""name"": ""value"",
        ...
      }
    }

The above is a sample code block" ; string actual = XmlTextHelper . NormalizeIndentation ( input ) ; Assert . AreEqual ( expectedButUndesired , actual ) ; }
NB: Having a code block as the first line means it can't discern the indentation correctly
NB : Having a code block as the first line means it can ' t discern the indentation correctly