File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ final case class HtmlTag(data: String) extends Inline {
86
86
}
87
87
88
88
private val TagsNotToClose = Set (" br" , " img" )
89
- def close = tagName collect { case name if ! TagsNotToClose (name) => HtmlTag (s " </ $name> " ) }
89
+ def close = tagName collect {
90
+ case name if ! TagsNotToClose (name) && ! data.endsWith(s " </ $name> " ) => HtmlTag (s " </ $name> " )
91
+ }
90
92
}
91
93
92
94
/** The summary of a comment, usually its first sentence. There must be exactly one summary per body. */
Original file line number Diff line number Diff line change
1
+ Chain(List(Chain(List(Text(Demonstrates a scala issue in which the closing link tag is duplicated), Text(
2
+ ), HtmlTag(<a href="https://link">title</a>), Text(
3
+ ), Text()))))
4
+ Done.
Original file line number Diff line number Diff line change
1
+ import scala .tools .nsc .doc .model ._
2
+ import scala .tools .partest .ScaladocModelTest
3
+
4
+ object Test extends ScaladocModelTest {
5
+ override def code = """
6
+ object Foo {
7
+ /**
8
+ * Demonstrates a scala issue in which the closing link tag is duplicated
9
+ * <a href="https://link">title</a>
10
+ */
11
+ def bar = ???
12
+ }
13
+ """
14
+
15
+ def scaladocSettings = " "
16
+
17
+ def testModel (root : Package ) = {
18
+ import access ._
19
+ val thing = root._object(" Foo" )._method(" bar" )
20
+ println(thing.comment.get.short)
21
+ }
22
+ }
You can’t perform that action at this time.
0 commit comments