-
Notifications
You must be signed in to change notification settings - Fork 1.7k
VSCode doesn't show new line on comments like Cargo doc does #1997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What does RLS do with that comment? |
I think with RLS it worked, but can’t confirm |
rust-analyzer trims all whitespace at the end of the line inside doc comments. I'll file a PR. |
Sorry @kjeremy I've just seen now that this is related to #1630. The obvious patch (not trimming if there are 3 spaces at the end of the line) would break |
@marcogroppo could you elaborate what would break and why? |
I must say that I am sad that we, as an industry, somehow arrived at the markup format where the trailing whitespace is significant :) But yeah, we should strip only leading whitespace from the docs, not the trailing |
Huh... I had no idea that adding spaces to the end would do that in markdown. A quick skim of rls code leads me to believe that they do not trim the end of the line but I still think we need to remove the |
@kjeremy how do you mean you need to remove the |
Yes you would remove the |
2101: Preserve whitespace at the end of doc comments r=matklad a=kjeremy Whitespace can have special meaning in markdown. For instance ending a line with three spaces will render a new line. Note that this behavior diverges from RLS. Fixes #1997 Co-authored-by: Jeremy Kolb <[email protected]>
When i write comments i would like to create a new line.
I've noticed that adding 3 spaces (similar to markdown) on the end creates a new line in the documentation.
For example this:
https://github.com/jasonwilliams/boa/blob/master/src/lib/realm.rs#L21-L22
generates this:

But in VSCode its all on 1 line:

Can this plugin change that?
Or have i posted this issue in the wrong place.
The text was updated successfully, but these errors were encountered: