mirror of
https://github.com/dergigi/boris.git
synced 2026-01-28 11:14:22 +01:00
fix: ensure highlights are shown for markdown content
- Only show raw ReactMarkdown when there are no highlights - Wait for finalHtml (with highlights) when highlights are present - Prevents highlights from being bypassed during markdown conversion
This commit is contained in:
@@ -190,7 +190,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
className={markdown ? "reader-markdown" : "reader-html"}
|
||||
dangerouslySetInnerHTML={{ __html: finalHtml }}
|
||||
/>
|
||||
) : markdown ? (
|
||||
) : markdown && relevantHighlights.length === 0 ? (
|
||||
<div
|
||||
ref={contentRef}
|
||||
className="reader-markdown"
|
||||
@@ -200,7 +200,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
) : (
|
||||
<div className="reader-html" ref={contentRef} />
|
||||
<div className={markdown ? "reader-markdown" : "reader-html"} ref={contentRef} />
|
||||
)
|
||||
) : (
|
||||
<div className="reader empty">
|
||||
|
||||
Reference in New Issue
Block a user