[BUG] Code block is not rendering properly
- Dominant language
- TypeScript
- Stars
- 716
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 35
Description
### Describe the bug.
we are trying to add new mdx to the generator but the code blocks are not rendering properly.
### Expected behavior
code blocks should render as expected!
### Screenshots
Not only the CoreMethods rendering issue, but there is also a coloring issue here. I'm attaching the two screenshots
In the first image, the imports are in green color, but in the second image, the imports are in blue.
And also, there are uneven padding issues. In the below example, the last two consts has left padding. I even checked if there is any extra spacing in this. But everything is good in md.
### How to Reproduce
Take the reference as this PR -> https://github.com/asyncapi/generator/pull/1924
Add this [api_components.mdx](https://github.com/asyncapi/generator/pull/1924/changes#diff-8574ba42b9e74563a275e006752a1a430d2a85a08fe2d9e0f931ed5398005994) in `pages\docs\tools\generator`
example preview -> https://69916ee787f5c900931efc18--asyncapi-website.netlify.app/docs/tools/generator/api_components
### 🖥️ Device Information [optional]
- Operating System (OS):
- Browser:
- Browser Version:
### 👀 Have you checked for similar open issues?
- [x] I checked and didn't find similar issue
### 🏢 Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)
### Are you willing to work on this issue ?
None
Contributor guide
Research direction
Reproduce the issue by adding api_components.mdx under pages\docs\tools\generator, using PR #1924 and its linked file as the reference. Check the generated preview for CoreMethods rendering, syntax-color differences, and uneven code-block padding. Done means the code blocks render consistently with the expected formatting and coloring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, tailwindcss, typescript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100