summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-09-21 12:41:59 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-09-21 12:41:59 +0000
commitfeb435cc0ac77d158ccd9a119ee248fe49c12529 (patch)
tree56fb6025244181c982462373986abaf9cabad681 /src
parent8b16236ebd7003218de2ac2fff9339972353e4bf (diff)
downloadscala-feb435cc0ac77d158ccd9a119ee248fe49c12529.tar.gz
scala-feb435cc0ac77d158ccd9a119ee248fe49c12529.tar.bz2
scala-feb435cc0ac77d158ccd9a119ee248fe49c12529.zip
[scaladoc] Closes #3541.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala10
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
}
}