Compare commits

...

3 Commits

Author SHA1 Message Date
Claire Chabas e1190dd55c Merge branch 'main' into claire/RND-9736-fix-inline-expressions-wrapping
* main:
  Update @gitbook/api to 0.163.0 (#4039)
  Prepare search for upcoming records (#4037)
2026-02-23 18:16:03 +00:00
Claire Chabas ec36369400 Prevent inline code to break to multiple lines 2026-02-23 18:13:36 +00:00
Claire Chabas d86d43db81 Prevent inline expressions from wrapping 2026-02-23 17:56:06 +00:00
3 changed files with 9 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Prevent inline expression from wrapping to the next line
@@ -22,5 +22,5 @@ export function InlineExpressionValue(props: {
[expression, evaluateInlineExpression]
);
return <>{result}</>;
return <span className="inline-block whitespace-nowrap break-normal">{result}</span>;
}
@@ -101,7 +101,9 @@ function Code(props: MarkedLeafProps<DocumentMarkCode>) {
// Text size is proportional to the font-size of the parent element
'text-[.875em]',
// We ensure that the code is not making the parent bigger, especially in headings
'leading-[calc(max(1.20em,1.25rem))]'
'leading-[calc(max(1.20em,1.25rem))]',
// Ensure that inline code does not break into multiple lines
'inline-flex whitespace-nowrap break-normal'
)}
>
{props.children}