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

Do not trim admonition content #183

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

damianstasik
Copy link
Collaborator

@damianstasik damianstasik commented Sep 5, 2024

The custom admonition syntax doesn't require a title/type so in that case we might be trimming whitespace that separates the first child and any JSX element that follows it. I've adjusted the logic to remove whitespace only if there's nothing left afterwards.

Here's an example of such admonition:
https://search.opentofu.org/provider/hashicorp/akamai/latest

Screenshot 2024-09-05 at 14 06 31

And here's the preview of the fix:
https://do-not-trim-admonition-conte.registry-ui-dxi.pages.dev/provider/hashicorp/akamai/latest

Screenshot 2024-09-05 at 14 07 11

Checklist

  • I have read the contribution guide.
  • I have not used an AI coding assistant to create this PR.
  • My contribution is compatible with the MPL-2.0 license and I have provided a DCO sign-off on all my commits.
  • I have written all code in this PR myself OR I have marked all code I have not written myself (including modified code, e.g. copied from other places and then modified) with a comment indicating where it came from.

Signed-off-by: Damian Stasik <[email protected]>
Copy link

Deploying registry-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 509cf7d
Status: ✅  Deploy successful!
Preview URL: https://be01b5a6.registry-ui-dxi.pages.dev
Branch Preview URL: https://do-not-trim-admonition-conte.registry-ui-dxi.pages.dev

View logs

@damianstasik damianstasik marked this pull request as ready for review September 5, 2024 12:07
@Yantrio Yantrio merged commit e9beda6 into main Sep 10, 2024
4 checks passed
@Yantrio Yantrio deleted the do-not-trim-admonition-content branch September 10, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants