Leverage itemized blocks to support formatting markdown block quotes by ytmimi ·...
source link: https://github.com/rust-lang/rustfmt/pull/5160
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Fixes #5157
Doc comments support markdown, but rustfmt didn't previously assign any
semantic value to leading '> '
in comments. This lead to poor formatting
when using wrap_comments=true
.
Now, rustfmt treats block quotes as itemized blocks, which greatly
improves how block quotes are formatted when wrap_comments=true
.
Next on my list to look at but not going to get to it tonight. Saw you had quoted quotes in the tests which is good, and also got me wondering if there'd be any utility in a mix like quoted lists or a list of quotes. Might be overkill though considering we really only care about the line start
I'm definitely happy to keep iterating on this and adding support for quoted lists and lists of quotes. I think to address the original issue that won't be necessary, but If you feel strongly about getting something like that in right now I can surely look into implementing it!
I think to address the original issue that won't be necessary, but If you feel strongly about getting something like that in right now I can surely look into implementing it!
No definitely not strongly. In general I feel like we could benefit from more exhaustive tests, so many times I'll vocalize a suggestion if an idea comes to me while looking at something related, tangential or otherwise.
Not my intent to scope creep though so don't hesitate to push back!
LGTM, thank you!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No one assigned
None yet
No milestone
Successfully merging this pull request may close these issues.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK