File tree 1 file changed +5
-5
lines changed
scaladoc/src/dotty/tools/scaladoc/snippets
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ object WrappedSnippet:
33
33
ps.startHide()
34
34
ps.println(s " package ${packageName.getOrElse(" snippets" )}" )
35
35
imports.foreach(i => ps.println(s " import $i" ))
36
- val classInfoSize = if classInfos.isEmpty then 1 else classInfos.length + (if usingQuotes then 1 else 0 )
36
+ val nestLevels = if classInfos.isEmpty then 1 else classInfos.length + (if usingQuotes then 1 else 0 )
37
37
if classInfos.isEmpty then
38
38
ps.println(" object Snippet {" )
39
39
else
@@ -46,16 +46,16 @@ object WrappedSnippet:
46
46
if usingQuotes then
47
47
ps.printlnWithIndent(classInfos.length * indent, " def f(using Quotes) = {" )
48
48
ps.endHide()
49
- str.split('\n ' ).foreach(ps.printlnWithIndent(classInfoSize * indent, _))
49
+ str.split('\n ' ).foreach(ps.printlnWithIndent(nestLevels * indent, _))
50
50
ps.startHide()
51
- (0 to classInfoSize - 1 ).reverse.foreach( i => ps.printlnWithIndent(i * indent, " }" ))
51
+ (0 to nestLevels - 1 ).reverse.foreach( i => ps.printlnWithIndent(i * indent, " }" ))
52
52
ps.endHide()
53
53
WrappedSnippet (
54
54
baos.toString,
55
55
outerLineOffset,
56
56
outerColumnOffset,
57
- classInfoSize + classInfos.flatMap(_.names).size + packageName.size + 2 /* Hide tokens*/ ,
58
- classInfoSize * indent
57
+ nestLevels + classInfos.flatMap(_.names).size + packageName.size + 2 /* Hide tokens*/ ,
58
+ nestLevels * indent
59
59
)
60
60
61
61
extension (ps : PrintStream )
You can’t perform that action at this time.
0 commit comments