diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2010-09-21 12:41:59 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2010-09-21 12:41:59 +0000 |
commit | feb435cc0ac77d158ccd9a119ee248fe49c12529 (patch) | |
tree | 56fb6025244181c982462373986abaf9cabad681 /src/compiler | |
parent | 8b16236ebd7003218de2ac2fff9339972353e4bf (diff) | |
download | scala-feb435cc0ac77d158ccd9a119ee248fe49c12529.tar.gz scala-feb435cc0ac77d158ccd9a119ee248fe49c12529.tar.bz2 scala-feb435cc0ac77d158ccd9a119ee248fe49c12529.zip |
[scaladoc] Closes #3541.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala index 2938fc163f..981d83fe02 100644 --- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala @@ -510,11 +510,19 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory => val iss = mutable.ListBuffer.empty[Inline] iss += inline0() while(!isInlineEnd && !checkParaEnded) { - if (char == endOfLine) nextChar() + val skipEndOfLine = if (char == endOfLine) { + nextChar() + true + } else { + false + } + val current = inline0() (iss.last, current) match { case (Text(t1), Text(t2)) => iss.update(iss.length - 1, Text(t1 + endOfLine + t2)) + case (_, Text(t)) if skipEndOfLine => + iss += Text(endOfLine + t) case _ => iss += current } } |