Skip to content

Commit e006980

Browse files
authored
Avoid parsing code comment twice (#16154)
2 parents 62684d0 + f4b6af2 commit e006980

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ object Preparser {
5858
case CodeBlockEndRegex(before, marker, after) :: ls =>
5959
if (!before.trim.isEmpty && !after.trim.isEmpty)
6060
go(docBody, tags, lastTagKey, before :: marker :: after :: ls, inCodeBlock = true)
61-
if (!before.trim.isEmpty)
61+
else if (!before.trim.isEmpty)
6262
go(docBody, tags, lastTagKey, before :: marker :: ls, inCodeBlock = true)
6363
else if (!after.trim.isEmpty)
6464
go(docBody, tags, lastTagKey, marker :: after :: ls, inCodeBlock = false)

0 commit comments

Comments
 (0)