Add a divider between the element description and docs in hovers

Change-Id: I08dc275fd343dc7eaa0f0c6033b8889882889cd2
Reviewed-on: https://dart-review.googlesource.com/c/87406
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Danny Tuppeny <dantup@google.com>
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
index 9f533fa..a5396e5 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
@@ -43,6 +43,7 @@
     }
 
     final content = new StringBuffer();
+    const divider = '---';
 
     // Description.
     if (hover.elementDescription != null) {
@@ -50,7 +51,7 @@
       if (hover.isDeprecated) {
         content.write('(deprecated) ');
       }
-      content..writeln(hover.elementDescription)..writeln('```')..writeln();
+      content..writeln(hover.elementDescription)..writeln('```');
     }
 
     // Source library.
@@ -66,6 +67,9 @@
 
     // Doc comments.
     if (hover.dartdoc != null) {
+      if (content.length != 0) {
+        content.writeln(divider);
+      }
       content.writeln(cleanDartdoc(hover.dartdoc));
     }
 
diff --git a/pkg/analysis_server/test/lsp/hover_test.dart b/pkg/analysis_server/test/lsp/hover_test.dart
index 1625425..f1312e2 100644
--- a/pkg/analysis_server/test/lsp/hover_test.dart
+++ b/pkg/analysis_server/test/lsp/hover_test.dart
@@ -46,7 +46,7 @@
 ```dart
 String abc
 ```
-
+---
 This is a string.
 
 With some [refs] and some