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

[BUG][DOCS GENERATOR] Newlines aren't properly trimmed #160

Open
ViMaSter opened this issue Jan 24, 2022 · 4 comments
Open

[BUG][DOCS GENERATOR] Newlines aren't properly trimmed #160

ViMaSter opened this issue Jan 24, 2022 · 4 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers nice to have
Milestone

Comments

@ViMaSter
Copy link
Member

Describe the bug

Generated Markdown files sometimes contain superfluous line-breaks.
Example:

This does not impact how the files are rendered (notice both entries having the same amount of newlines in the preview versus the source code linked above), as Markdown consolidates newlines into one.

Steps To Reproduce

  • Unclear. I suppose this has to do with how the GitHub Actions runner handles newlines (\r, \n \r\n) and therefore isn't reproducible on Windows for me at the moment.

Expected behavior

@ViMaSter ViMaSter added bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers labels Jan 24, 2022
@girijakar
Copy link

Hi @ViMaSter
I had gone through all the markdown files in the docs folder. Couldn't find any lines having incorrect amount of space as you have described :)

@ViMaSter
Copy link
Member Author

Hey! Thanks for looking into it; and welcome! Good to know the current docs are fine so far.

Which OS are you running? 093810a definitely allows the issue to be reproduced if you're running the docs_generator on anything Unix-based.
If you're managing to reproduce that, stepping through https://github.com/Studio-Lovelies/GG-JointJustice-Unity/blob/develop/docs_generator/Scanner.cs#L117 and checking if anything surrounding methodInfo.Summary contains superfluous \n or \r, could probably shine some light on where these line-breaks come from. After that, it's only a matter of trimming them; either inside the source it's parsing or during doc-generation (which I think is the safer approach).

Definitely feel free to open a PR, if you're managing to reproduce and resolve the issue!

@girijakar
Copy link

I am running Windows.

@ViMaSter
Copy link
Member Author

Just checked it out, the issue is actually reproducible on Windows as well with git config core.autocrlf set to input, but probably just limited to the line endings present inside 093810a which isn't merged into develop yet.
If you want to look at it further and manage to resolve it for that commit, feel free to create a PR with those changes targeting develop!

@notexplosive notexplosive added this to the 1.0: Case 2 milestone Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers nice to have
Projects
None yet
Development

No branches or pull requests

3 participants