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

Bad Markdown rendering of lists in documentation on hover #27271

Closed
fbricon opened this issue May 25, 2017 · 1 comment
Closed

Bad Markdown rendering of lists in documentation on hover #27271

fbricon opened this issue May 25, 2017 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-hover Editor mouse hover good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities verified Verification succeeded
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented May 25, 2017

  • VSCode Version: 1.12.2, latest 1.13.0-insiders
  • OS Version: macOS Sierra 10.12.4

Steps to Reproduce:

  1. install the redhat java extension
  2. open a java file
  3. add import java.util.Map;
  4. hover over Map, scroll to the bottom.

List is not displayed properly. 1st level bullets and content are on separate lines:
screen shot 2017-05-25 at 9 25 29 am

When Markdown Javadoc was introduced last september, this is how it looked:
javadoc

I don't know when the regression was introduced.

This is the completion item sent to VS Code:

[Trace - 9:38:45 AM] Sending request 'textDocument/hover - (92)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/fbricon/Dev/souk/aloha/src/main/java/com/redhat/developers/msa/aloha/TracingConfiguration.java"
    },
    "position": {
        "line": 4,
        "character": 18
    }
}


[Trace - 9:38:45 AM] Received response 'textDocument/hover - (92)' in 30ms.
Result: {
    "contents": [
        "An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value.\n\nThis interface takes the place of the Dictionary class, which was a totally abstract class rather than an interface.\n\nThe Map interface provides three *collection views*, which allow a map's contents to be viewed as a set of keys, collection of values, or set of key-value mappings. The *order* of a map is defined as the order in which the iterators on the map's collection views return their elements. Some map implementations, like the TreeMap class, make specific guarantees as to their order; others, like the HashMap class, do not.\n\nNote: great care must be exercised if mutable objects are used as map keys. The behavior of a map is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is a key in the map. A special case of this prohibition is that it is not permissible for a map to contain itself as a key. While it is permissible for a map to contain itself as a value, extreme caution is advised: the equals and hashCode methods are no longer well defined on such a map.\n\nAll general-purpose map implementation classes should provide two \"standard\" constructors: a void (no arguments) constructor which creates an empty map, and a constructor with a single argument of type Map, which creates a new map with the same key-value mappings as its argument. In effect, the latter constructor allows the user to copy any map, producing an equivalent map of the desired class. There is no way to enforce this recommendation (as interfaces cannot contain constructors) but all of the general-purpose map implementations in the JDK comply.\n\nThe \"destructive\" methods contained in this interface, that is, the methods that modify the map on which they operate, are specified to throw UnsupportedOperationException if this map does not support the operation. If this is the case, these methods may, but are not required to, throw an UnsupportedOperationException if the invocation would have no effect on the map. For example, invoking the `putAll(Map)` method on an unmodifiable map may, but is not required to, throw the exception if the map whose mappings are to be \"superimposed\" is empty.\n\nSome map implementations have restrictions on the keys and values they may contain. For example, some implementations prohibit null keys and values, and some have restrictions on the types of their keys. Attempting to insert an ineligible key or value throws an unchecked exception, typically NullPointerException or ClassCastException. Attempting to query the presence of an ineligible key or value may throw an exception, or it may simply return false; some implementations will exhibit the former behavior and some will exhibit the latter. More generally, attempting an operation on an ineligible key or value whose completion would not result in the insertion of an ineligible element into the map may throw an exception or it may succeed, at the option of the implementation. Such exceptions are marked as \"optional\" in the specification for this interface.\n\nMany methods in Collections Framework interfaces are defined in terms of the `equals` method. For example, the specification for the `containsKey(Object key)` method says: \"returns true if and only if this map contains a mapping for a key k such that (key==null ? k==null : key.equals(k)).\" This specification should *not* be construed to imply that invoking Map.containsKey with a non-null argument key will cause key.equals(k) to be invoked for any key k. Implementations are free to implement optimizations whereby the equals invocation is avoided, for example, by first comparing the hash codes of the two keys. (The `Object.hashCode()` specification guarantees that two objects with unequal hash codes cannot be equal.) More generally, implementations of the various Collections Framework interfaces are free to take advantage of the specified behavior of underlying `Object` methods wherever the implementor deems it appropriate.\n\nSome map operations which perform recursive traversal of the map may fail with an exception for self-referential instances where the map directly or indirectly contains itself. This includes the clone(), equals(), hashCode() and toString() methods. Implementations may optionally handle the self-referential scenario, however most current implementations do not do so.\n\nThis interface is a member of the  Java Collections Framework.\n\n *  **See Also:**\n    \n     *  HashMap\n     *  TreeMap\n     *  Hashtable\n     *  SortedMap\n     *  Collection\n     *  Set\n *  **Parameters:**\n    \n     *  **<K>** the type of keys maintained by this map\n     *  **<V>** the type of mapped values\n *  **Author:**\n    \n     *  Josh Bloch\n *  **Since:**\n    \n     *  1.2"
    ]
}
@joaomoreno joaomoreno added this to the Backlog milestone Jun 13, 2017
@joaomoreno joaomoreno added good first issue Issues identified as good for first-time contributors bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities editor-hover Editor mouse hover labels Jun 13, 2017
@joaomoreno joaomoreno changed the title regression: bad Markdown rendering of lists in documentation on hover Bad Markdown rendering of lists in documentation on hover Jun 13, 2017
@joaomoreno joaomoreno modified the milestones: July 2017, Backlog Jul 5, 2017
@joaomoreno
Copy link
Member

Fixed!

image

@Lixire Lixire added the verified Verification succeeded label Aug 2, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-hover Editor mouse hover good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants