Skip to content

Commit f849b91

Browse files
committed
Fix tests. Fix bug with hidden lines
1 parent 1b32edf commit f849b91

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

project/scripts/cmdScaladocTests

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ DOTTY_NONBOOTSTRAPPED_VERSION=$(eval $DOTTY_NONBOOTSTRAPPED_VERSION_COMMAND | ta
1616
DOTTY_BOOTSTRAPPED_VERSION_COMMAND="$SBT \"eval println(Build.dottyVersion)\""
1717
DOTTY_BOOTSTRAPPED_VERSION=$(eval $DOTTY_BOOTSTRAPPED_VERSION_COMMAND | tail -n 2 | head -n 1)
1818

19+
GITHUB_REPOSITORY="lampepfl/dotty"
20+
GITHUB_SHA="3.0.0"
21+
1922
"$SBT" "scaladoc/generateTestcasesDocumentation" > "$tmp" 2>&1 || echo "generated testcases project with sbt"
2023
dist/target/pack/bin/scaladoc \
2124
-d "$OUT1" \
@@ -31,6 +34,8 @@ dist/target/pack/bin/scaladoc \
3134
-Ygenerate-inkuire \
3235
"-skip-by-id:scala.runtime.stdLibPatches" \
3336
"-skip-by-id:scala.runtime.MatchCase" \
37+
"-snippet-compiler:scaladoc-testcases/docs=compile" \
38+
-siteroot scaladoc-testcases/docs \
3439
-project-footer "Copyright (c) 2002-2021, LAMP/EPFL" \
3540
-author -groups -revision master -project-version "${DOTTY_BOOTSTRAPPED_VERSION}" \
3641
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

+1-1
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)