diff --git a/scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala b/scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala index 76d88a8a0bb3..803ad863c9b7 100644 --- a/scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala +++ b/scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala @@ -20,8 +20,15 @@ class DocRender(signatureRenderer: SignatureRenderer)(using DocContext): renderLink(link, default => text(if name.isEmpty then default else name)).toString )) - private def listItems(items: Seq[WikiDocElement]) = - items.map(i => li(renderElement(i))) + private def listItems(items: Seq[WikiDocElement]): Seq[AppliedTag] = items match + case Nil => Nil + case (x :: (y: (UnorderedList | OrderedList)) :: tail) => + li( + renderElement(x), + renderElement(y) + ) +: listItems(tail) + case (x :: tail) => + li(renderElement(x)) +: listItems(tail) private def notSupported(name: String, content: AppliedTag): AppliedTag = report.warning(s"Wiki syntax does not support $name in ${signatureRenderer.currentDri.location}") content diff --git a/scaladoc/src/dotty/tools/scaladoc/tasty/comments/Comments.scala b/scaladoc/src/dotty/tools/scaladoc/tasty/comments/Comments.scala index 9f3cbdbcf384..52093e42a6f0 100644 --- a/scaladoc/src/dotty/tools/scaladoc/tasty/comments/Comments.scala +++ b/scaladoc/src/dotty/tools/scaladoc/tasty/comments/Comments.scala @@ -211,7 +211,7 @@ class WikiCommentParser(repr: Repr)(using DocContext) private def flatten(b: wiki.Inline): String = b match case wiki.Text(t) => t case wiki.Italic(t) => flatten(t) - case wiki.Bold(t) =>flatten(t) + case wiki.Bold(t) => flatten(t) case wiki.Underline(t) => flatten(t) case wiki.Superscript(t) => flatten(t) case wiki.Subscript(t) => flatten(t)