Skip to content

fix: allow inline widgets to expand text lines - #149

Open
dux-web wants to merge 1 commit into
foresightmobile:mainfrom
sailry:fix/inline-widget-struts
Open

dux-web wants to merge 1 commit into
foresightmobile:mainfrom
sailry:fix/inline-widget-struts

Conversation

@dux-web

@dux-web dux-web commented Oct 14, 2026

Copy link
Copy Markdown

Summary

Allow inline widgets to expand their text line rather than being clipped by a forced strut. Detect WidgetSpan recursively so nested syntax-highlighter spans behave the same way. Text-only paragraphs retain their existing fixed strut.

This applies to both selectable and non-selectable Markdown. No public API changes.

Validation

Using Flutter 3.44.7 stable / Dart 3.12.2:

  • flutter test test/inline_widget_test.dart: 7 passed, including six regressions covering tall widgets, nested widget spans, and unchanged text-only struts in both selection modes
  • flutter analyze --no-pub lib/src/builder.dart test/inline_widget_test.dart test/all.dart: passed with no issues
  • dart format --output=none --set-exit-if-changed --line-length 120 lib/src/builder.dart test/inline_widget_test.dart test/all.dart: passed
  • git diff --check: passed

The tests use widget geometry and strut assertions, not screenshot/golden updates. The complete suite and device integration tests were not run locally.

Prepared with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant