Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flutter_markdown] Soft wrapping in blockquotes (#7848)
Makes `flutter_markdown` treat paragraphs in blockquotes like a normal paragraph with respect to soft wrapping. Currently, line breaks in blockquotes translate directly to line breaks in the output. This happens regardless of the Markdown Specification chosen. Such behavior is different from most Markdown implementations, including the reference ones cited in [flutter_markdown ](https://pub.dev/packages/flutter_markdown) ([Dart Markdown Live Editor](https://dart-lang.github.io/markdown/) and the [Markdown Live Preview](https://markdownlivepreview.com/)). Example: ``` > my > blockquote ``` Currently renders like: > my > blockquote And this PR fixes it to become: > my blockquote Note: previewing in this GitHub editor, I get the hard-wrap behavior. However, [Dart Markdown Live Editor](https://dart-lang.github.io/markdown/) gives the soft-wrap behavior in all flavors, even when "GitHub Flavored Markdown" is selected. Reading the GFM spec [there's an example](https://github.github.com/gfm/#example-222) that to me implies that soft-wrapping is the correct thing in GFM, plus that's what I gather from reading [6.12](https://github.github.com/gfm/#hard-line-breaks) and [6.13](https://github.github.com/gfm/#soft-line-breaks). However, if for some reason we should hard-wrap in GFM, it should be just a matter of checking the chosen `extensionSet` when deciding whether to call `trimText()`. Seems clear to me hard-wrapping shouldn't ever be the only behavior. Issues: this fixes flutter/flutter#156554
- Loading branch information