Code diff highlighting not working

Open Beginner friendly
#1,047 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
documentation

Research direction

Start at the Start migration page and inspect how the shown code block is rendered, comparing the expected diff markers with the displayed output. Trace the page's code-highlighting path and verify the fix by confirming that added and removed lines render with the intended highlighting.

Written by the indexing model from the issue text.

Description

Image

This is what's rendering, at least on the Start migration page. I couldn't find another issue for this but if there is one, apologies for the duplicate.

- export default async function Page({ // [!code --]
-   params, // [!code --]
- }: { // [!code --]
-   params: Promise<{ slug: string }> // [!code --]
- }) { // [!code --]
+ export const Route = createFileRoute('/app/posts/$slug')({ // [!code ++]
+   component: Page, // [!code ++]
+ }) // [!code ++]

+ function Page() { // [!code ++]
-   const { slug } = await params // [!code --]
+   const { slug } = Route.useParams() // [!code ++]
  return <div>My Post: {slug}</div>
}
Dominant language
TypeScript
Stars
1.1k
Forks
401
Avg merge
18h 44m
Merged PRs (30d)
55

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/tanstack.com

All issues in TanStack/tanstack.com

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.