Skip to content

Commit

Permalink
Fix tests. Fix bug with hidden lines
Browse files Browse the repository at this point in the history
  • Loading branch information
pikinier20 committed Aug 10, 2021
1 parent 8042328 commit 004edfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions project/scripts/cmdScaladocTests
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ dist/target/pack/bin/scaladoc \
-Ygenerate-inkuire \
"-skip-by-id:scala.runtime.stdLibPatches" \
"-skip-by-id:scala.runtime.MatchCase" \
"-siteroot scaladoc-testcases/docs" \
"-snippet-compiler=scaladoc-testcases/docs=compile" \
-project-footer "Copyright (c) 2002-2021, LAMP/EPFL" \
-author -groups -revision master -project-version "${DOTTY_BOOTSTRAPPED_VERSION}" \
out/bootstrap/scaladoc-testcases/scala-"${DOTTY_NONBOOTSTRAPPED_VERSION}"/classes > "$tmp" 2>&1 || echo "generated testcases project with scripts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ object SnippetRenderer:
if elem.content.startsWith(currPrefix) then currPrefix else elem.content.takeWhile(_ == ' ')
}
snippetLines.map { line =>
if line.classes.contains("hideable") then line
if line.classes.contains("hideable") || maxCommonIndent.size == 0 then line
else line.copy(content = span(cls := "hideable")(maxCommonIndent).toString + line.content.stripPrefix(maxCommonIndent))
}
}.getOrElse(snippetLines)
Expand Down

0 comments on commit 004edfa

Please sign in to comment.