Migrate markdown formatting from mdformat to dprint - #758
Draft
kmontemayor2-sc wants to merge 1 commit into
Draft
Conversation
Replace mdformat/.mdformat.toml with dprint (dprint.json), matching the previous mdformat style as closely as dprint allows: lineWidth=120 with textWrap=always (mdformat wrap=120), asterisk emphasis, dash bullets, and table formatting built in. The mdformat exclusion list (MD_EXCLUDE_DIRS) moves into dprint.json excludes; the formatted markdown file set is byte-identical between the old find expression and dprint's resolution. dprint also picks up toml (pyproject reformats) and cmake (gigl-core CMakeLists reformats; cmake commands are case-insensitive). Remaining one-time normalizations dprint applies that mdformat did not (no config knobs exist for these): thematic breaks ______ -> ---, task-list continuation lines aligned under content, blank lines around headings/lists, table column padding, and common-indent stripping inside code fences. Output is idempotent; make check_format_md passes. The dprint CLI is provided by the dprint-py wheel (a thin PyPI repackaging of the official dprint binary) so the existing 'uv run' pattern keeps working. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found that dprint is much much faster (and supports more file types, we could do e.x. yaml formatting in the future too)
Replace mdformat/.mdformat.toml with dprint (dprint.json), matching the previous mdformat style as closely as dprint allows: lineWidth=120 with textWrap=always (mdformat wrap=120), asterisk emphasis, dash bullets, and table formatting built in. The mdformat exclusion list (MD_EXCLUDE_DIRS) moves into dprint.json excludes; the formatted markdown file set is byte-identical between the old find expression and dprint's resolution. dprint also picks up toml (pyproject reformats) and cmake (gigl-core CMakeLists reformats; cmake commands are case-insensitive).
Remaining one-time normalizations dprint applies that mdformat did not (no config knobs exist for these): thematic breaks ______ -> ---, task-list continuation lines aligned under content, blank lines around headings/lists, table column padding, and common-indent stripping inside code fences. Output is idempotent; make check_format_md passes.
The dprint CLI is provided by the dprint-py wheel (a thin PyPI repackaging of the official dprint binary) so the existing 'uv run' pattern keeps working.
Scope of work done
Where is the documentation for this feature?: N/A
Did you add automated tests or write a test plan?
Updated Changelog.md? NO
Ready for code review?: NO