eclipse-jdt / eclipse.jdt.core

Eclipse Public License 2.0
164 stars 130 forks source link

[23] [markdown] JDT is erratic in rendering markdown with newline characters as unicode #3239

Open jarthana opened 2 days ago

jarthana commented 2 days ago

Looks like JDT has trouble parsing when line delimiters are represented as unicode. For e.g. this: /// Unicode in markdown \u000A///\u000D///\u000D\u000A///here

Hover or the Javadoc view in Eclipse IDE shows this: here

But the Javadoc from the JDK renders this as:

Unicode in markdown

here

I don't yet know what's going on here. I will investigate.

jarthana commented 2 days ago

I see two problems here. First, the Scanner#lineBeginsWithMarkdown() doesn't handle \r and \n in unicode form properly. The result was, at each unicode delimiter, we were creating a new markdown comment. Net result, only the last line was being attached to the element.

  1. I think the HTML rendering in the jdt.ui is needs more work to handle this.

I have a patch for (1). Will see what it takes for (2).