Skip to content

Fix more <para> cases#173

Merged
carlossanlop merged 3 commits intodotnet:mainfrom
carlossanlop:FixParaNewLines
Aug 15, 2024
Merged

Fix more <para> cases#173
carlossanlop merged 3 commits intodotnet:mainfrom
carlossanlop:FixParaNewLines

Conversation

@carlossanlop
Copy link
Contributor

@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
@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