diff --git a/.changeset/many-moons-shave.md b/.changeset/many-moons-shave.md new file mode 100644 index 0000000000..fd3a908e17 --- /dev/null +++ b/.changeset/many-moons-shave.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Fix headings styles in hint block diff --git a/packages/gitbook/src/components/DocumentView/Heading.tsx b/packages/gitbook/src/components/DocumentView/Heading.tsx index 769bb66ba4..d062077197 100644 --- a/packages/gitbook/src/components/DocumentView/Heading.tsx +++ b/packages/gitbook/src/components/DocumentView/Heading.tsx @@ -46,6 +46,8 @@ export function Heading(props: BlockProps) { 'flex-1', 'z-[1]', 'justify-self-start', + 'max-w-full', + 'break-words', getTextAlignment(block.data.align), textStyle.lineHeight )} diff --git a/packages/gitbook/src/components/DocumentView/Hint.tsx b/packages/gitbook/src/components/DocumentView/Hint.tsx index bcc9e5bc7a..9d8b283a7b 100644 --- a/packages/gitbook/src/components/DocumentView/Hint.tsx +++ b/packages/gitbook/src/components/DocumentView/Hint.tsx @@ -52,8 +52,10 @@ export function Hint(props: BlockProps) { {hasHeading ? (