[PR #4486] [MERGED] docs(generate-secret): update selector to target specific code span #31007

Closed
opened 2026-04-17 21:57:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4486
Author: @GivenBY
Created: 9/6/2025
Status: Merged
Merged: 9/7/2025
Merged by: @Bekacru

Base: mainHead: fix/docs-generate-secret-selector


📝 Commits (1)

  • 8c9ae09 docs(generate-secret): update selector to target specific code span lines

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/components/generate-secret.tsx (+1 -1)

📄 Description

Updated GenerateSecret to use
querySelectorAll("pre code span.line span")
instead of getElementsByTagName("code")
so it correctly targets line spans in code blocks.

Before
before

After
after


Summary by cubic

Updated GenerateSecret to target code line spans precisely, so only the secret line is updated instead of whole code blocks. Fixes incorrect replacements in docs and places the generated secret in the right spot.

  • Bug Fixes
    • Use querySelectorAll("pre code span.line span") instead of getElementsByTagName("code") to select only line spans.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4486 **Author:** [@GivenBY](https://github.com/GivenBY) **Created:** 9/6/2025 **Status:** ✅ Merged **Merged:** 9/7/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/docs-generate-secret-selector` --- ### 📝 Commits (1) - [`8c9ae09`](https://github.com/better-auth/better-auth/commit/8c9ae09272a4bdb118d37f4b805b38509619f847) docs(generate-secret): update selector to target specific code span lines ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/components/generate-secret.tsx` (+1 -1) </details> ### 📄 Description Updated GenerateSecret to use `querySelectorAll("pre code span.line span")` instead of `getElementsByTagName("code")` so it correctly targets line spans in code blocks. **Before** <img width="785" height="160" alt="before" src="https://github.com/user-attachments/assets/c918e18d-b474-407e-bf0b-b4b7959a5b59" /> **After** <img width="870" height="170" alt="after" src="https://github.com/user-attachments/assets/4cb764a3-de85-4621-b657-3400ccb4f32b" /> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Updated GenerateSecret to target code line spans precisely, so only the secret line is updated instead of whole code blocks. Fixes incorrect replacements in docs and places the generated secret in the right spot. - **Bug Fixes** - Use querySelectorAll("pre code span.line span") instead of getElementsByTagName("code") to select only line spans. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 21:57:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#31007