You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: don't add extra newlines when there aren't extra sections in doc markdown
Currently if you have a simple scaladoc and you use `renderAsMarkdown`
(which Metals does) to render markdown for hovers, there are extra
newlines added that aren't necessary. Normally you can't tell as it
seems some editors just trim off the extra newlines, but you can see
in certain editors and in the REPL as well.
_Notice how it removes two lines_
```diff
scala> :doc CanEqual
Companion object containing a few universally known `CanEqual` instances.
CanEqual instances involving primitive types or the Null type are handled directly in
the compiler (see Implicits.synthesizedCanEqual), so they are not included here.
-
-
```
This just ensures that we add the extra two newlines only when we know
we have more sections coming.
fixesscalameta/metals#3740
0 commit comments