Skip to content
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

Documentation in places like hovers does not render HTML tags like b, i, blockquote #3782

Closed
osaxma opened this issue Jan 15, 2022 · 2 comments
Labels
in editor Relates to code editing or language features is bug
Milestone

Comments

@osaxma
Copy link

osaxma commented Jan 15, 2022

Describe the bug

The content between blockquote tags isn't shown in the hover documentation.

Screen Shot 2022-01-15 at 4 24 49 PM

image screenshot taken from: analyzer-3.1.0/lib/dart/element/element.dart

Steps To Reproduce

Sample documentation shown in the photo above that can be used for reproduction:

  /// Return the element representing the setter that results from looking up
  /// the given [setterName] in this class with respect to the given [library],
  /// or `null` if the look up fails. The behavior of this method is defined by
  /// the Dart Language Specification in section 16.15.2:
  /// <blockquote>
  /// The result of looking up getter (respectively setter) <i>m</i> in class
  /// <i>C</i> with respect to library <i>L</i> is: If <i>C</i> declares an
  /// instance getter (respectively setter) named <i>m</i> that is accessible to
  /// <i>L</i>, then that getter (respectively setter) is the result of the
  /// lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result
  /// of the lookup is the result of looking up getter (respectively setter)
  /// <i>m</i> in <i>S</i> with respect to <i>L</i>. Otherwise, we say that the
  /// lookup has failed.
  /// </blockquote>
  PropertyAccessorElement? lookUpSetter(
      String setterName, LibraryElement library);

// source: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/lib/dart/element/element.dart#L343

Expected behavior
The complete documentation should be shown.

Versions:

  • VS Code version: 1.63.2
  • Dart extension version: 3.32.0
  • Dart/Flutter SDK version:
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (4 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1
@osaxma osaxma added the is bug label Jan 15, 2022
@osaxma
Copy link
Author

osaxma commented Jan 15, 2022

It looks like html tags are not rendered in general such as <b> and <i> but their content is still shown.

@DanTup
Copy link
Member

DanTup commented Jan 17, 2022

I think we need LSP support for this. There's an issue at microsoft/language-server-protocol#1344 suggesting we have it from the next LSP version, although I'm not certain how it works (I've asked for clarification).

@DanTup DanTup added blocked on vs code / lsp / dap Requires a change in VS Code to progress in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server labels Jan 17, 2022
@DanTup DanTup added this to the v3.36.0 milestone Jan 17, 2022
@DanTup DanTup modified the milestones: v3.36.0, v3.38.0 Mar 1, 2022
@DanTup DanTup modified the milestones: v3.38.0, v3.39.0 Mar 21, 2022
@DanTup DanTup modified the milestones: v3.40.0, v3.42.0 Apr 27, 2022
@DanTup DanTup changed the title The hover Documentation isn't showing the complete documentation when there's blockquote Documentation in places like hovers does not render HTML tags like b, i, blockquote May 26, 2022
@DanTup DanTup removed blocked on vs code / lsp / dap Requires a change in VS Code to progress in lsp/analysis server Something to be fixed in the Dart analysis server labels May 26, 2022
@DanTup DanTup closed this as completed in ea5f5dc May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is bug
Projects
None yet
Development

No branches or pull requests

2 participants