diff options
author | Vlad Ureche <vlad.ureche@epfl.ch> | 2016-01-29 11:10:50 +0100 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@epfl.ch> | 2016-01-29 11:10:50 +0100 |
commit | 78f0437ac06e71a94a38721751ef5d36ca62c062 (patch) | |
tree | 9d91cd4600803771f4a509b1e49afb475ecb8f61 | |
parent | ddd83de2bc44471353e34d20fae037cc88267838 (diff) | |
parent | 37cdf8993e53f368fb11fceda3ffa5999401c645 (diff) | |
download | scala-78f0437ac06e71a94a38721751ef5d36ca62c062.tar.gz scala-78f0437ac06e71a94a38721751ef5d36ca62c062.tar.bz2 scala-78f0437ac06e71a94a38721751ef5d36ca62c062.zip |
Merge pull request #4915 from petermz/ticket/9599
SI-9599 Multiple @todo formatted with comma on separate line
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 2 | ||||
-rw-r--r-- | test/scaladoc/resources/SI-9599.scala | 6 | ||||
-rw-r--r-- | test/scaladoc/scalacheck/HtmlFactoryTest.scala | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala index e0cfbc9334..05724a879a 100644 --- a/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala @@ -624,7 +624,7 @@ class Template(universe: doc.Universe, generator: DiagramGenerator, tpl: DocTemp <dt>To do</dt> <dd>{ val todoXml: List[NodeSeq] = (for(todo <- comment.todo ) yield <span class="cmt">{bodyToHtml(todo)}</span> ) - todoXml.reduceLeft(_ ++ Text(", ") ++ _) + todoXml.reduceLeft(_ ++ _) }</dd> } diff --git a/test/scaladoc/resources/SI-9599.scala b/test/scaladoc/resources/SI-9599.scala new file mode 100644 index 0000000000..9365243ffb --- /dev/null +++ b/test/scaladoc/resources/SI-9599.scala @@ -0,0 +1,6 @@ +/** + * @todo todo1 + * @todo todo2 + * @todo todo3 + */ +class X diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala index 913667b79b..f0f106b293 100644 --- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala +++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala @@ -819,4 +819,11 @@ object Test extends Properties("HtmlFactory") { } } + + property("SI-9599 Multiple @todo formatted with comma on separate line") = { + createTemplates("SI-9599.scala")("X.html") match { + case node: scala.xml.Node => node.text.contains("todo3todo2todo1") + case _ => false + } + } } |