Skip to content

Commit

Permalink
TokenOps bugfix: don't use block before docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Jul 4, 2020
1 parent 3e9cfa9 commit d962207
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ object TokenOps {
ft.meta.right.text.startsWith("/**") &&
TreeOps
.findTreeOrParent(ft.meta.leftOwner) {
case t if t.pos.end <= ft.right.start => None
case _: Pkg | _: Source | _: Template | _: Term.Block => Some(false)
case t if t.pos.end > ft.right.start => Some(true)
case _ => None
case _ => Some(true)
}
.isEmpty

Expand Down
1 change: 0 additions & 1 deletion scalafmt-tests/src/test/resources/test/JavaDoc.stat
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,6 @@ object a {
input.read
/** foo */
.foo { bar }

/** baz */
.baz(qux)
}

0 comments on commit d962207

Please sign in to comment.