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

scaladoc duplicates link close tags #9704

Closed
scabug opened this issue Mar 13, 2016 · 3 comments
Closed

scaladoc duplicates link close tags #9704

scabug opened this issue Mar 13, 2016 · 3 comments

Comments

@scabug
Copy link

scabug commented Mar 13, 2016

Given the following source:

package m

object Thing {
  /**
    * Demonstrates a scala issue in which the closing link tag is duplicated
    * <a href="https://very-link">much title</a>
    */
  def apply(args: List[String]): Unit = {
  }
}

Scaladoc outputs the following code (formatted and annotated):

<p class="shortcomment cmt">Demonstrates a scala issue in which the closing link tag is duplicated
  <a href="https://very-link">much title</a>
  </a> <!-- this should not be here and is invalid -->
</p>
<div class="fullcomment">
  <div class="comment cmt">
    <p>
      Demonstrates a scala issue in which the closing link tag is duplicated
      <a href="https://very-link">much title</a>
    </p>
  </div>
</div>

A repro project can be found here: https://github.com/timcharper/scala-doc-dup-tag

@scabug
Copy link
Author

scabug commented Mar 13, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9704?orig=1
Reporter: @timcharper

@scabug
Copy link
Author

scabug commented Mar 13, 2016

@timcharper said:
I discovered this issue when trying to build dash docsets for api; this file was causing invalid docs: https://github.com/sbt/sbt/blob/0.13/compile/interface/src/main/scala/xsbt/Command.scala

@scabug
Copy link
Author

scabug commented Feb 8, 2017

@Philippus said:
Looks like this was introduced in this PR:

https://github.com/scala/scala/pull/2278/files

an HtmlTag can include the closing tag, and this situation is not taken into account in the close method of HtmlTag.

I've made a PR (using your example as a test case):
scala/scala#5681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants