packages
packages copied to clipboard
[flutter_markdown] Remove TaskListSyntax and rely on markdown native checkbox support - Fixes https://github.com/flutter/flutter/issues/107871
Fixes https://github.com/flutter/flutter/issues/107871
Note: This PR relies on the next Markdown to be released, as found in https://github.com/dart-lang/markdown/
This PR
- Removes custom
TaskListSyntax
inline syntax as Markdown now supports checkboxes natively. - Changes the code in
_buildCheckbox()
slightly to just check for the existence of the 'checked' attribute to determine if a checkbox's state is checked. - Fix the test file list_test.dart to expect the
indicatorForCheckedCheckBox
andindicatorForUncheckedCheckBox
codes to prefix the list item text, as Markdown now inserts these into the text when checkboxes are present. - [Temporary] changes pubspec.yaml to use markdown version from GitHub (temporary until next markdown release to pub.dev).
Pre-launch Checklist
- [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [X] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format
.) - [X] I signed the [CLA].
- [X] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences]
- [X] I listed at least one issue that this PR fixes in the description above.
- [X] I updated
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [X] I updated
CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style]. - [X] I updated/added relevant documentation (doc comments with
///
). - [X] I added new tests to check the change I am making, or this PR is [test-exempt].
- [X] All existing and new tests are passing.
PTAL @srawlins
Tim, you have a couple of conflicts due to another PR landing. You'll need to update CHANGELOG.md
to accomodate.
@domesticmouse I merged into the new changed master and updated this version to be called 0.6.10+4
I'm happy to land this once we have a published version of the markdown
package in the pubspec.yaml
PTAL @stuartmorgan I believe this is now ready to land
Note: the Ordered and Unordered task list item syntaxes are getting a big refactor soon. I don't think it should be breaking, but note just in case: https://github.com/dart-lang/markdown/pull/450
After this lands I plan on cutting markdown 6.0.1
Can we land this soon (or reformulate the PR and land something like it)? We haven't been able to roll the latest markdown into the dart sdk repo for ~3 months now; I believe we're waiting on this fix landing, this being published, and then the latest markdown and flutter_markdon packages rolling into the sdk simultaneously.