Repository navigation
Conversation
Chakra's CSS reset sets `h1..h6 { font-size: inherit; font-weight: inherit }`
and `margin: 0`, so the h1-h6 nodes react-markdown emits rendered as plain body
text because componentsMk had no overrides for them. Add explicit styles for all
six levels.
Also:
- `a` hardcoded fontWeight/fontSize through BodyText, so `**[link](url)**` lost
its bold; inherit them from the surrounding context instead.
- `strong`/`em` forced #252A32, overriding link colour inside `[**text**](url)`.
- markdown table headers were fontWeight 400, unlike the tool-result tables.
- `ol` had no indent margin, unlike `ul`.
- fenced code always highlighted as SQL; read the language off the className and
fall back to unhighlighted output when highlight.js does not know it.
- add blockquote, hr and del; stop nesting CodeBlock's <pre> inside another.
Contributor
|
@rdahis esse pull request tem conflitos 😩 |
…rendering # Conflicts: # next/components/organisms/chatbot/markdown.js
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Chatbot answers still drop some markdown formatting on
main:arenders throughBodyText, which hardcodesfontWeight="400"andfontSize="16px". In**[documentação](url)**the link's own declaration beats the bold inherited from<strong>. A link inside a heading also shrinks back to 16px.strongandemforce#252A32, so[**text**](url)renders in body colour.```pythoncan break the message.delandhrwere unstyled, andCodeBlock's<pre>was nested inside the<pre>react-markdown emits.Scope update
This PR originally also styled
h1–h6, indentedol, setthto weight 600 and addedblockquote.mainfixed all of those in 75e03b1, which caused the conflict. The merge withmainkeepsmain's version of those and leaves only the four fixes above. The diff is one file, +40/−8.Changes (
next/components/organisms/chatbot/markdown.js)ainherits weight, size and line height from its context.strong,emand the newdelinherit colour.codereads the language fromclassName(defaultsql), andCodeBlockfalls back to unhighlighted output whenhljs.getLanguagedoes not know the language.preunwraps to a fragment.hris styled.Testing
The file passes a JSX parse check (esbuild). Not yet checked against a live thread in a running app.
Git Flow
This is the
mainPR.developmentandstagingalready have 75e03b1, so the PRs into them carry only this diff.🤖 Generated with Claude Code