diff --git a/packages/pdf/src/templates/shared/rich-text.tsx b/packages/pdf/src/templates/shared/rich-text.tsx index 91d35ac92..959606897 100644 --- a/packages/pdf/src/templates/shared/rich-text.tsx +++ b/packages/pdf/src/templates/shared/rich-text.tsx @@ -128,6 +128,15 @@ export const RichText = ({ children }: RichTextProps) => { ); + let hasNestedList = false; + if (Array.isArray(children)) { + hasNestedList = children.some( + (child) => + child?.props?.element?.rawTagName === "ul" || + child?.props?.element?.rawTagName === "ol", + ); + } + // Same BiDi-injection trick as the

renderer — see applyRtlDirectionRecursively. const contentNode = rtl ? ( { > {markerNode} - {children} + {children} );