Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Words in Scaladoc are truncated unexpectedly when running Scalafmt #3125

Closed
Atry opened this issue Feb 18, 2022 · 2 comments
Closed

Words in Scaladoc are truncated unexpectedly when running Scalafmt #3125

Atry opened this issue Feb 18, 2022 · 2 comments

Comments

@Atry
Copy link

Atry commented Feb 18, 2022

This template is a guideline, not a strict requirement.

  • Version: 3.4.2
  • Integration: VSCode
  • Configuration:
runner.dialect = scala3
version = "3.4.2"
maxColumn = 80
align.inInterpolation = true
newlines.inInterpolation = oneline

Steps

Given code like this:

/** Title
  * @example
  *   {{{
  *   println("example")
   some.example(foo)
  *   }}}
  */
def foo = ()

When I run scalafmt from VSCode

Problem

Scalafmt formats code like this:

/** Title
  * @example
  *   {{{
  *   println("example")
  *   e.example(foo)
  *   }}}
  */
def foo = ()

Expectation

I would like the formatted output to look like this:

/** Title
  * @example
  *   {{{
  *   println("example")
  *   some.example(foo)
  *   }}}
  */
def foo = ()```
@kitbellew
Copy link
Collaborator

/** Title
  * @example
  *   {{{
  *   println("example")
   some.example(foo)
  *   }}}
  */

This is not valid scaladoc. The leading asterisk is required.

@Atry
Copy link
Author

Atry commented Feb 18, 2022

I create a new bug report including the * in the example at #3129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants