Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad indention when examples from external file used #2830

Closed
LukasSefcik opened this issue Jun 4, 2018 · 4 comments · Fixed by #8607
Closed

Bad indention when examples from external file used #2830

LukasSefcik opened this issue Jun 4, 2018 · 4 comments · Fixed by #8607
Labels
bug A bug to fix dotnet Generate .NET API reference docs
Milestone

Comments

@LukasSefcik
Copy link

LukasSefcik commented Jun 4, 2018

DocFX Version Used: 2.36.1.0

Template used: default

Steps to Reproduce:

  1. I added examples from external file.
    <code source="..\..\Examples\Kros.KORM.Examples\IQueryExample.cs" title="Query data by query builder" region="Select" lang="c#" />
  2. Build documentation.

Example file looks like this:

namespace KORM.Test.Performance.Doc
{
    internal class IQueryExample
    {
        public void SelectExample()
        {
            using (var database = new Database(new SqlConnection()))
            {
                #region Select
                var people = database.Query<Person>()
                    .Select("p.Id", "FirstName", "LastName", "PostCode")
                    .From("Person JOIN Address ON (Person.AddressId = Address.Id)")
                    .Where("Age > @1", 18);

                foreach (var person in people)
                {
                    Console.WriteLine(person.FirstName);
                }
                #endregion
            }
        }
    }
}

Expected Behavior:
Indention retrieved from the source file start from 0 indention.

Actual Behavior:
The indention is retrieved from the source file:
docfx_example

@vwxyzh
Copy link
Contributor

vwxyzh commented Jun 4, 2018

@LukasSefcik is there mixed tabs and spaces in your source code.

@LukasSefcik
Copy link
Author

@vwxyzh No, I only use spaces.

@vwxyzh vwxyzh self-assigned this Jun 6, 2018
@vwxyzh vwxyzh added the bug A bug to fix label Jun 6, 2018
@vwxyzh vwxyzh added this to the v2.37 milestone Jun 7, 2018
@herohua
Copy link
Contributor

herohua commented Jun 13, 2018

@LukasSefcik
This bug is fixed in v2.36.2. Can you kindly verify? Thanks!

@LukasSefcik
Copy link
Author

@herohua
Still bad indention. I have installed version 2.36.2 via chocolatey.

@yufeih yufeih added the dotnet Generate .NET API reference docs label Dec 15, 2022
@yufeih yufeih closed this as completed Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix dotnet Generate .NET API reference docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants