Skip to content

Commit

Permalink
FormatWriter: remove appendWithMargin for scaladoc
Browse files Browse the repository at this point in the history
We will be formatting with term indent as a parameter, to support nested
terms, hence let's remove this method lest it get used incorrectly by
mistake.
  • Loading branch information
kitbellew committed Jan 8, 2022
1 parent c50f824 commit e1d706c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1035,10 +1035,10 @@ class FormatWriter(formatOps: FormatOps) {
else {
if (sb.length != sbLen) {
if (prevWasBlank) appendBreak()
appendBreakWithMargin()
appendBreak().append(margin)
} else {
if (style.docstrings.skipFirstLineIf(prevWasBlank))
appendBreakWithMargin()
appendBreak().append(margin)
else sb.append(' ')
}
val extraMargin =
Expand All @@ -1054,8 +1054,6 @@ class FormatWriter(formatOps: FormatOps) {

@inline private def appendBreak() =
sb.append('\n').append(spaces).append('*')
@inline private def appendBreakWithMargin() =
appendBreak().append(margin)
}

}
Expand Down

0 comments on commit e1d706c

Please sign in to comment.