Skip to content

Commit 004edfa

Browse files
committed
Fix tests. Fix bug with hidden lines
1 parent 8042328 commit 004edfa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

project/scripts/cmdScaladocTests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ dist/target/pack/bin/scaladoc \
3131
-Ygenerate-inkuire \
3232
"-skip-by-id:scala.runtime.stdLibPatches" \
3333
"-skip-by-id:scala.runtime.MatchCase" \
34+
"-siteroot scaladoc-testcases/docs" \
35+
"-snippet-compiler=scaladoc-testcases/docs=compile" \
3436
-project-footer "Copyright (c) 2002-2021, LAMP/EPFL" \
3537
-author -groups -revision master -project-version "${DOTTY_BOOTSTRAPPED_VERSION}" \
3638
out/bootstrap/scaladoc-testcases/scala-"${DOTTY_NONBOOTSTRAPPED_VERSION}"/classes > "$tmp" 2>&1 || echo "generated testcases project with scripts"

scaladoc/src/dotty/tools/scaladoc/tasty/comments/markdown/SnippetRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ object SnippetRenderer:
6565
if elem.content.startsWith(currPrefix) then currPrefix else elem.content.takeWhile(_ == ' ')
6666
}
6767
snippetLines.map { line =>
68-
if line.classes.contains("hideable") then line
68+
if line.classes.contains("hideable") || maxCommonIndent.size == 0 then line
6969
else line.copy(content = span(cls := "hideable")(maxCommonIndent).toString + line.content.stripPrefix(maxCommonIndent))
7070
}
7171
}.getOrElse(snippetLines)

0 commit comments

Comments
 (0)