You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Markdown: code blocks scroll horizontally instead of wrapping #270
The Markdown widget (#254, PR #268) wraps a code block's long lines rather than scrolling them sideways, as GitHub and shadcn's typography do.
Why it wraps today: an eggshell horizontal scroll area needs a definite height, and a code block's height is its content's. Scrolling sideways needs a scroll axis that sizes to its content on the other axis (taffy overflow-x: auto with an auto height).
Wanted:
A code block whose lines exceed the column scrolls horizontally, keeps its own height, and keeps its fill and radius.
The same for the source shown in "Not shown: …" boxes.
A test through the real draw path: a long line in the sample, the block's height equal to one row per line, and a horizontal scroll reaching the line's end.
Related: #255 (highlighting), which will also want a non-wrapping code block; doing both together avoids reworking the block twice.
Activity