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

Fix more <para> cases #173

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Conversation

carlossanlop
Copy link
Member

@carlossanlop carlossanlop commented Aug 15, 2024

Improve the logic that wraps paragraphs with <para></para>:

  • Join paragraphs separated by newlines.
  • Split paragraphs that end in "." or ":".
  • Treat "-or-" and "- or -" as their own paragraphs.
  • Make sure single paragraphs are not wrapped.
  • Make sure empty newlines are ignored.

I'd appreciate a review from the folks who noticed the noisy <para> when porting, @eiriktsarpalis @jozkee @gewarren @lonitra

- Join paragraphs separated by newlines.
- Split paragraphs that end in "." or ":".
- Treat "-or-" and "- or -" as their own paragraphs.
- Make sure single paragraphs are not wrapped.
- Make sure empty newlines are ignored.
@carlossanlop carlossanlop added the port-to-docs Issues related to the PortToDocs tool. label Aug 15, 2024
@carlossanlop carlossanlop self-assigned this Aug 15, 2024
@carlossanlop carlossanlop requested a review from lonitra August 15, 2024 22:20
@carlossanlop carlossanlop merged commit 467397b into dotnet:main Aug 15, 2024
2 checks passed
@carlossanlop carlossanlop deleted the FixParaNewLines branch August 15, 2024 22:49
@eiriktsarpalis
Copy link
Member

eiriktsarpalis commented Aug 16, 2024

Amazing, thanks! It would interesting to see if we could retroactively fix up some of the docs that were already ported using the old logic. A regex detecting single-line <para> elements might be a good start (although it's reasonable to expect a few false positives showing up there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port-to-docs Issues related to the PortToDocs tool.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants