Skip to content

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

Closed

Description

@osaxma

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

Activity

  1. osaxma commented on Jan 15, 2022

    @osaxma
    Author

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

  2. DanTup commented on Jan 17, 2022

    @DanTup
    Member

    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).

  3. added this to the v3.36.0 milestone on Jan 17, 2022
  4. modified the milestones: v3.36.0, v3.38.0 on Mar 1, 2022
  5. modified the milestones: v3.38.0, v3.39.0 on Mar 21, 2022
  6. modified the milestones: v3.40.0, v3.42.0 on Apr 27, 2022
  7. 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` [/+] on May 26, 2022
  8. added a commit that references this issue on Sep 2, 2025
    ea5f5dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions