Skip to content

Commit b1f380b

Browse files
committed
chore: formatting
1 parent b7f87aa commit b1f380b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/MDX/InlineCode.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ function InlineCode({
2323
return (
2424
<code
2525
// dir="ltr" // This is needed to prevent the code from inheriting the RTL direction of <html> in case of RTL languages to avoid like `()console.log` to be rendered as `console.log()`
26-
dir={typeof props.children !== "string" ? "ltr" : ["[", "]"].includes(props.children) ? "rtl" : "ltr"}
26+
dir={
27+
typeof props.children !== 'string'
28+
? 'ltr'
29+
: ['[', ']'].includes(props.children)
30+
? 'rtl'
31+
: 'ltr'
32+
}
2733
className={cn(
2834
'inline text-code text-secondary dark:text-secondary-dark px-1 rounded-md no-underline',
2935
{

0 commit comments

Comments
 (0)