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

Format multi line strings #3422

Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented May 22, 2024

fix #1016

Format multi lines string

@doc(
  """
          multi line
          do
          ${"abc"}
          """
)
@doc("""
def
""")
model Foo {}

alias T = """
          abc
          def ${"abc"}
          ghi
          """;

formats to

@doc("""
  multi line
  do
  ${"abc"}
  """)
@doc("""
  def
  """)
model Foo {}

alias T = """
  abc
  def ${"abc"}
  ghi
  """;

@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label May 22, 2024
@azure-sdk
Copy link
Collaborator

azure-sdk commented May 22, 2024

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - feature ✏️

Formatter: Indent or dedent multiline strings to the current indentation

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3422/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3422/

@timotheeguerin timotheeguerin marked this pull request as ready for review May 22, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:core Issues for @typespec/compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formatting of multi line string
3 participants