summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-07-29 07:16:41 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-07-29 07:16:41 -0700
commitce9e98177e7a36327cf4a2d33772b626e9e2e753 (patch)
treef5ca9bc1019a1fcdd9022f69696c7b0cd871a245
parente95691996d3df58499491db6c5b6d386b64cefdc (diff)
parentfa09fad51fb54ad37d34685943ec1c74dbbf8687 (diff)
downloadscala-ce9e98177e7a36327cf4a2d33772b626e9e2e753.tar.gz
scala-ce9e98177e7a36327cf4a2d33772b626e9e2e753.tar.bz2
scala-ce9e98177e7a36327cf4a2d33772b626e9e2e753.zip
Merge pull request #990 from VladUreche/issue/6140
SI-6140 Scaladoc infinite recursion in wiki parser
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala2
-rw-r--r--test/scaladoc/run/SI-6140.check1
-rw-r--r--test/scaladoc/run/SI-6140.scala18
3 files changed, 20 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 1a11964e37..85d6a8911e 100644
--- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
@@ -660,7 +660,7 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory with Member
else if (check(",,")) subscript()
else if (check("[[")) link()
else {
- readUntil { char == safeTagMarker || check("''") || char == '`' || check("__") || char == '^' || check(",,") || check("[[") || check("{{") || isInlineEnd || checkParaEnded || char == endOfLine }
+ readUntil { char == safeTagMarker || check("''") || char == '`' || check("__") || char == '^' || check(",,") || check("[[") || isInlineEnd || checkParaEnded || char == endOfLine }
Text(getRead())
}
}
diff --git a/test/scaladoc/run/SI-6140.check b/test/scaladoc/run/SI-6140.check
new file mode 100644
index 0000000000..619c56180b
--- /dev/null
+++ b/test/scaladoc/run/SI-6140.check
@@ -0,0 +1 @@
+Done.
diff --git a/test/scaladoc/run/SI-6140.scala b/test/scaladoc/run/SI-6140.scala
new file mode 100644
index 0000000000..4bb9a4dc85
--- /dev/null
+++ b/test/scaladoc/run/SI-6140.scala
@@ -0,0 +1,18 @@
+import scala.tools.nsc.doc.model._
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+
+ // This caused an infinite recursion in method inline() in CommentFactory.scala
+ override def code = """
+ /** {{ code? }} */
+ class C
+ """
+
+ // no need for special settings
+ def scaladocSettings = ""
+
+ def testModel(rootPackage: Package) = {
+ // if it doesn't hang, the test is passed
+ }
+}