fix: update language display logic in Shiki code highlighter
- Modified the language display condition to show an empty div for plaintext instead of rendering the language name and icon. - This change improves the clarity of the code highlighter by avoiding unnecessary elements for plaintext. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
42150751f2
commit
20049b0150
|
|
@ -193,7 +193,9 @@ const ShikiCode: FC<
|
|||
)}
|
||||
>
|
||||
<div className="flex items-center justify-between border-b p-2">
|
||||
{language !== "plaintext" && (
|
||||
{language === "plaintext" ? (
|
||||
<div />
|
||||
) : (
|
||||
<span className="center flex gap-1 text-xs uppercase opacity-80 dark:text-white">
|
||||
<span className="center [&_svg]:size-4">{getLanguageIcon(language)}</span>
|
||||
<span>{language}</span>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export const EntryContent: Component<EntryContentProps> = ({
|
|||
EventBus.subscribe(COMMAND_ID.timeline.switchToNext, scrollAndFocus),
|
||||
EventBus.subscribe(COMMAND_ID.timeline.switchToPrevious, scrollAndFocus),
|
||||
)
|
||||
}, [])
|
||||
}, [entryId])
|
||||
|
||||
const safeUrl = useFeedSafeUrl(entryId)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue