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

Prisma docstrings are mangled on wrap #306

Closed
lostfictions opened this issue Jan 28, 2022 · 3 comments
Closed

Prisma docstrings are mangled on wrap #306

lostfictions opened this issue Jan 28, 2022 · 3 comments

Comments

@lostfictions
Copy link

lostfictions commented Jan 28, 2022

When writing a Prisma schema file, which differentiates between // and ///, Rewrap incorrectly wraps the latter form (///).

For example, given the following:

/// this is the post model. it probably doesn't require much elaboration as it's fairly self-evident, but i'm going to ramble on at length about it.
model Post {
  id Int @id @default(autoincrement())
  text String
}

Rewrap will wrap the comment as follows:

/// this is the post model. it probably doesn't require much elaboration as it's
//fairly self-evident, but i'm going to ramble on at length about it.
model Post {
  id Int @id @default(autoincrement())
  text String
}

The wrapped comment doesn't preserve the /// syntax, and instead mangles it to //. The spacing between the slashes and the start of the comment is also lost.

@stkb stkb added the backlog On the backlog of things to do label Jan 28, 2022
stkb added a commit that referenced this issue Jan 29, 2022
@stkb
Copy link
Owner

stkb commented Jan 29, 2022

Hi this should be fixed in pre-release version 17.4.

@stkb stkb added in pre-release version Is in pre-release version but not in stable yet and removed backlog On the backlog of things to do labels Jan 29, 2022
@lostfictions
Copy link
Author

Thanks for the quick response! Seems to work great with 17.4.

stkb added a commit that referenced this issue Jan 30, 2022
stkb added a commit that referenced this issue Jan 30, 2022
- VS Code: Attempt to prevent rare "TextEditor has been disposed" error (#100)
- Lua: Support `--[=[` block comments (#290)
- MDX files: Treat as Markdown.
- Support Prisma (#306)
@stkb
Copy link
Owner

stkb commented Jan 31, 2022

Now also in stable version 1.16.1

@stkb stkb closed this as completed Jan 31, 2022
@stkb stkb removed the in pre-release version Is in pre-release version but not in stable yet label Jan 31, 2022
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