-
Notifications
You must be signed in to change notification settings - Fork 25
Tim/eng 1475 visual bugs #3021
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
base: main
Are you sure you want to change the base?
Tim/eng 1475 visual bugs #3021
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| }, | ||
| ], | ||
| // Generic plugin to extract all meta attributes as data-* props | ||
| rehypeCodeMeta, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Rehype plugin order causes lost metadata
The rehypeCodeMeta plugin runs after rehypePrettyCode, but rehypePrettyCode removes the data.meta property from code elements during its processing. This means rehypeCodeMeta won't find any meta attributes to extract, causing all custom code block attributes like copy, filename, variant, etc. to be silently lost. The plugin should run before rehypePrettyCode to capture the meta string before it's consumed.
| const paramValue = searchParams.get(option.id); | ||
| if (paramValue) { | ||
| currentValues[option.id] = paramValue; | ||
| hasGuideParams = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: URL language param not mapped back to form value
The form-to-URL mapping in handleLanguageChange converts form values ("ts") to URL params ("typescript"), but the URL-to-form sync in the useEffect directly uses the URL param value without reverse mapping. When the URL contains lang=typescript, this value gets set as the form field value, but the select field only accepts "ts" or "python" as valid options (per guide.toml). This causes the language select to show an invalid or empty state when navigating to a guide with lang=typescript in the URL.
Additional Locations (1)
| !occurrences || occurrences.includes(occurrenceCount); | ||
|
|
||
| if (shouldHighlight) { | ||
| return `>${prefix}<span class="highlighted-word">${pattern}</span>`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Substring highlighting adds duplicate angle bracket character
The applySubstringHighlighting function uses a lookbehind regex (?<=>) that asserts there's a > before the match without consuming it. However, the replacement string at line 306 starts with >, which adds a duplicate > character. Since lookbehinds don't consume characters, the original > remains in the HTML while the replacement inserts another one, corrupting the output (e.g., <span> becomes <span>>). The replacement string should not include the leading >.
Note
Adds a dynamic Guides system with configurable steps, a dedicated Templates page with sidebar filters, revamped MDX/code block rendering, major nav restructure, and SEO/domain updates.
guidesrouting (/guides, catch-all) with manifest-driven flows (guide.toml), step discovery, and client-side builder (GuideForm,DynamicGuideBuilder).GuideStepsWrapper, TOC integration, scope selector) and content loaders (parseGuideManifest,getCachedGuideSteps)./templatesapp route with its own layout and sidebar filters (TemplatesSideNav) syncing URL params; updated grid/cards and copyable command snippet.ServerCodeBlock,ServerFigure,ServerInlineCode, ANSI and highlight support, generic meta parsing (rehype-code-meta), improvedCodeSnippet, interactiveFileTree.docs.fiveonefour.comwith updated URLs; README docs forGITHUB_TOKENand GitHub stars fetch supporting auth.cacheComponents), tsconfig preset updates, Biome config added; removed app.npmrchoist override; deps added for Radix, TanStack Form, Zod, and utilities.Written by Cursor Bugbot for commit b953777. This will update automatically on new commits. Configure here.