scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Example scaladoc code is not formatted #12746

Closed som-snytt closed 1 year ago

som-snytt commented 1 year ago

Reproduction steps

Scala version: 2.13.10

https://www.scala-lang.org/api/current/scala/collection/immutable/List.html#to[C1](factory:scala.collection.Factory[A,C1]):C1

  /** Given a collection factory `factory`, convert this collection to the appropriate
   *  representation for the current element type `A`. Example uses:
   *
   *  {{{
   *      xs.to(List)
   *      xs.to(ArrayBuffer)
   *      xs.to(BitSet) // for xs: Iterable[Int]
   *  }}}
   */

Problem

Example code is not formatted.

som-snytt commented 1 year ago

noticed at https://github.com/scala/bug/issues/12745#issuecomment-1458867682

som-snytt commented 1 year ago

Local build looks like

image

Standard build looks like

image

som-snytt commented 1 year ago

Local:

<span name="scala.collection.IterableOnceOps.to.C1" class="extype">C1</span></span></span><p class="shortcomment cmt">Given a collection factory <code>factory</code>, convert this collection to the appropriate
 representation for the current element type <code>A</code>.</p><div class="fullcomment"><div class="comment cmt"><p>Given a collection factory <code>factory</code>, convert this collection to the appropriate
 representation for the current element type <code>A</code>. Example uses:</p><pre>xs.to(<span class="std">List</span>)
xs.to(ArrayBuffer)
xs.to(BitSet) <span class="cmt">// for xs: Iterable[Int]</span></pre></div><dl class="attributes block"><dt>Definition Classes</dt><dd>

Online:

<span name="scala.collection.IterableOnceOps.to.C1" class="extype" title="scala.collection.IterableOnceOps.to.C1">C1</span></span></span><p class="shortcomment cmt" style="display: none;">Given a collection factory <code>factory</code>, convert this collection to the appropriate
representation for the current element type <code>A</code>.</p><div class="fullcomment" style="display: block;"><div class="comment cmt"><p>Given a collection factory <code>factory</code>, convert this collection to the appropriate
representation for the current element type <code>A</code>. Example uses:</p><p>     xs.to(List)
     xs.to(ArrayBuffer)
     xs.to(BitSet) // for xs: Iterable[Int]
</p></div><dl class="attributes block"><dt>Definition Classes</dt><dd>

Maybe it's just the way the release build is run.

SethTisue commented 1 year ago

Not sure what happened, but the 2.13.11 doc seems fixed.